Skip to content

Additional snapshot methods#1

Open
d503int wants to merge 4 commits intomanual-scale-supportfrom
additional-snapshot-methods
Open

Additional snapshot methods#1
d503int wants to merge 4 commits intomanual-scale-supportfrom
additional-snapshot-methods

Conversation

@d503int
Copy link
Collaborator

@d503int d503int commented Oct 30, 2017

  • Added usesWindowToDrawViewHierarchy option is to FBSnapshotTestController and FBSnapshotTestCase

  • Changed the behavior of usesDrawViewHierarchyInRect option in FBSnapshotTestController

[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];

if (drawingViewHierarchyInRect) {
[view drawViewHierarchyInRect:view.bounds afterScreenUpdates:YES];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can use bounds directly here


/**
When YES, adds view to a window before capturing the snapshot.
@attention Can't be used with layers.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a better semantics here would be "the setting only affects views, and ignored for layers", or "for layers this must be left to NO".

/**
When YES, adds view to a window before capturing the snapshot.
@attention Can't be used with layers.
@attention If the view does't belong to a UIWindow, it will create one and add the view as a subview.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"when set to YES...".

*/
@property (readwrite, nonatomic, assign) BOOL usesDrawViewHierarchyInRect;

/**
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing the period at the end (also for usesDrawViewHierarchyInRect above), and more importantly the description of what happens if the flag is NO (which I assume is the default).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants