|
@@ -81,10 +81,18 @@
|
|
|
[super viewDidAppear:animated];
|
|
[super viewDidAppear:animated];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-- (void)willAnimateRotationToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration {
|
|
|
|
|
-
|
|
|
|
|
- // 重新布局 Item 大小
|
|
|
|
|
- [self.previewContainer.collectionViewLayout invalidateLayout];
|
|
|
|
|
|
|
+- (void)viewWillTransitionToSize:(CGSize)size withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator {
|
|
|
|
|
+ [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator];
|
|
|
|
|
+
|
|
|
|
|
+ [coordinator animateAlongsideTransitionInView:self.previewContainer animation:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
|
|
|
|
|
+
|
|
|
|
|
+ // 重新布局 Item 大小
|
|
|
|
|
+ [self.previewContainer.collectionViewLayout invalidateLayout];
|
|
|
|
|
+
|
|
|
|
|
+ } completion:^(id<UIViewControllerTransitionCoordinatorContext> _Nonnull context) {
|
|
|
|
|
+
|
|
|
|
|
+ [self.previewContainer reloadData];
|
|
|
|
|
+ }];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- (BOOL)prefersStatusBarHidden {
|
|
- (BOOL)prefersStatusBarHidden {
|