I am looking at implementing some custom IOS7 Transitions. For example these here.
When a button is pressed in this example the following is run:
-(void)showNewController:(id)sender{
UIStoryboard* storyboard = [UIStoryboard storyboardWithName:@"Main_iPhone" bundle:[NSBundle mainBundle]];
UIViewController* controller = [storyboard instantiateViewControllerWithIdentifier:@"PresentedViewController"];
if(sender == self.button1){
self.animationController = [[ZoomAnimationController alloc] init];
}else{
self.animationController = [[DropAnimationController alloc] init];
}
controller.transitioningDelegate = self;
[self presentViewController:controller animated:YES completion:nil];
}
Question
I am trying to understand the correct place to pass information to the new UIViewController
. As an example lets say I am trying to pass a UIImage to the new (to be) presented view controller.
Typically I would complete this in the prepareForSegue
method, but as this is not a segue what would be the correct way to pass the data.
I could simply add in as an example the following:
controller.passingImage = self.imageToPass;
Would this be the correct process to follow when working with custom transitions in IOS7?