OverlayTransitioner
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
- (UIPresentationController *)presentationControllerForPresentedViewController:(UIViewController *)presented presentingViewController:(UIViewController *)presenting sourceViewController:(UIViewController *)source | |
{ | |
// Here, we'll provide the presentation controller to be used for the presentation | |
Class presentationControllerClass; | |
// If our presentation should be awesome, return the AAPLCoolPresentationController. We determine this based on -[AAPLRootViewController presentationShouldBeAwesome] | |
if([source isKindOfClass:[AAPLRootViewController class]] && [(AAPLRootViewController *)source presentationShouldBeAwesome]) | |
{ | |
presentationControllerClass = [AAPLCoolPresentationController class]; | |
} | |
else | |
{ | |
presentationControllerClass = [AAPLOverlayPresentationController class]; | |
} | |
return [[presentationControllerClass alloc] initWithPresentedViewController:presented presentingViewController:presenting]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment