Created
June 16, 2016 19:58
-
-
Save JoelJWest/fce509189bd28fdafd8d2a4b973acc15 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - (void)viewWillTransitionToSize:(CGSize)size | |
| withTransitionCoordinator:(id<UIViewControllerTransitionCoordinator>)coordinator { | |
| NSUInteger currentAccountIndex = self.currentAccountIndex; | |
| [super viewWillTransitionToSize:size withTransitionCoordinator:coordinator]; | |
| [coordinator animateAlongsideTransition:nil | |
| completion:^ (id<UIViewControllerTransitionCoordinatorContext> context) { | |
| self.currentAccountIndex = currentAccountIndex; | |
| self.accountsCollectionView.contentOffset = CGPointMake(self.accountsCollectionView.width * currentAccountIndex, 0.f); | |
| }]; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment