Skip to content

Commit

Permalink
Merge pull request jverkoey#538 from LiyeZhang/master
Browse files Browse the repository at this point in the history
Fixing bug where tableviews with clear backgrounds turn black on rotation
  • Loading branch information
jverkoey committed Apr 22, 2014
2 parents 01d85c5 + 6454ef5 commit 4c7b1d6
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 4c7b1d6

Please sign in to comment.