Skip to content

Commit 0d59e4e

Browse files
committed
Merge branch 'asset-position-bug-fix' of https://github.com/storix/CTAssetsPickerController into custom-fetch
2 parents f2abd36 + 81a05b0 commit 0d59e4e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CTAssetsPickerController/CTAssetItemViewController.m

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,12 @@ - (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIVi
109109
[super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
110110

111111
[coordinator animateAlongsideTransition:^(id<UIViewControllerTransitionCoordinatorContext> context) {
112-
[self.scrollView updateZoomScalesAndZoom:YES];
112+
113+
// Ensure that a future call to updateConstraintsIfNeeded calls updateConstraints.
114+
[self.scrollView setNeedsUpdateConstraints];
115+
[self.scrollView updateConstraintsIfNeeded];
116+
117+
[self.scrollView updateZoomScalesAndZoom:YES];
113118
} completion:nil];
114119
}
115120

0 commit comments

Comments
 (0)