diff --git a/Pod/Classes/WPMediaCollectionViewController.m b/Pod/Classes/WPMediaCollectionViewController.m index 89ea3855..12b855b7 100644 --- a/Pod/Classes/WPMediaCollectionViewController.m +++ b/Pod/Classes/WPMediaCollectionViewController.m @@ -111,23 +111,6 @@ - (void)setupLayout } -- (void)willRotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation duration:(NSTimeInterval)duration -{ - self.firstVisibleCell = [self.collectionView.indexPathsForVisibleItems firstObject]; - [super willRotateToInterfaceOrientation:toInterfaceOrientation duration:duration]; -} - -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation -{ - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - if (!self.firstVisibleCell){ - return; - } - [self.collectionView scrollToItemAtIndexPath:self.firstVisibleCell - atScrollPosition:UICollectionViewScrollPositionLeft|UICollectionViewScrollPositionTop - animated:NO]; -} - - (void)viewWillLayoutSubviews { [super viewWillLayoutSubviews]; [self setupLayout];