lxy 2 years ago
parent
commit
8b8225cb29

+ 3 - 2
SDK/LenzCameraNativeModuleForRN/LenzCameraNativeModuleForRN/Classes/inner/PCSBaseViewController/PCSPreviewViewController.m

@@ -253,10 +253,11 @@
 - (void)viewDidAppear:(BOOL)animated {
     [super viewDidAppear:animated];
 //    [self scrollViewDidEndDecelerating:self.collectionView];
-    [self.collectionView scrollToItemAtIndexPath:self.currentIndexPath atScrollPosition:UICollectionViewScrollPositionRight animated:NO];
-    self.collectionView.hidden = NO;
     dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(.35 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+        [self.collectionView scrollToItemAtIndexPath:self.currentIndexPath atScrollPosition:UICollectionViewScrollPositionRight animated:NO];
+        self.collectionView.hidden = NO;
         [self updateCurrentIndexPath];
+
     });
 }