Skip to content

Commit

Permalink
Changing how Nimbus does table snapshots so that if a tableview have …
Browse files Browse the repository at this point in the history
…a clear background, on a rotation, it does not exist assume that the proper background is black.
  • Loading branch information
liyezhang committed Apr 21, 2014
1 parent 01d85c5 commit 6454ef5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/src/NISnapshotRotation.m
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ - (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrie
}

self.frameBeforeRotation = rotationView.frame;
self.snapshotViewBeforeRotation = NISnapshotViewOfView(rotationView);
self.snapshotViewBeforeRotation = NISnapshotViewOfViewWithTransparency(rotationView);
[containerView insertSubview:self.snapshotViewBeforeRotation aboveSubview:rotationView];
}

Expand All @@ -146,7 +146,7 @@ - (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInte

[UIView setAnimationsEnabled:NO];

self.snapshotViewAfterRotation = NISnapshotViewOfView(rotationView);
self.snapshotViewAfterRotation = NISnapshotViewOfViewWithTransparency(rotationView);
// Set the new frame while maintaining the old frame's height.
self.snapshotViewAfterRotation.frame = CGRectMake(self.frameBeforeRotation.origin.x,
self.frameBeforeRotation.origin.y,
Expand Down

0 comments on commit 6454ef5

Please sign in to comment.