Created
October 31, 2013 18:07
-
-
Save ppm/7254204 to your computer and use it in GitHub Desktop.
Response to animated/interactive UIViewController transition.
This file contains 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)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
[self.transitionCoordinator animateAlongsideTransition:nil completion:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
if ( [context initiallyInteractive] ) return; | |
[self _onTransitionEnd:context]; | |
}]; | |
[self.transitionCoordinator notifyWhenInteractionEndsUsingBlock:^(id<UIViewControllerTransitionCoordinatorContext> context) { | |
[self _onTransitionEnd:context]; | |
}]; | |
} | |
- (void)_onTransitionEnd:(id<UIViewControllerTransitionCoordinatorContext>)context | |
{ | |
if ( [context isCancelled] ) { | |
} | |
else { | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment