Skip to content

Commit 0eb2ec6

Browse files
committed
Force an explicit layout before calculating the toFrame
1 parent eb32fb1 commit 0eb2ec6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Objective-C/TOCropViewController/Models/TOCropViewControllerTransitioning.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,9 @@ - (void)animateTransition:(id <UIViewControllerContextTransitioning>)transitionC
5353
if (self.isDismissing == NO) {
5454
[containerView addSubview:cropViewController.view];
5555

56-
//Force a relayout now that the view is in the view hierarchy (so things like the safe area insets are now valid)
56+
//Force a relayout now that the view is in the view hierarchy (so things like the safe area insets are now valid)]
57+
[cropViewController.view setNeedsLayout];
58+
[cropViewController.view layoutIfNeeded];
5759
[cropViewController viewDidLayoutSubviews];
5860
}
5961
else {

0 commit comments

Comments
 (0)