I've got a custom UIStoryboardSegue
that 'zooms' a UIImageView
. Now I also need a custom UIStoryboardSegue
that 'zooms out' when a user presses the back button in the UINavigationController
. I've been trying to do this for some days now, but without success.
I've subclassed UINavigationController
and added the code below to it:
- (UIStoryboardSegue *)segueForUnwindingToViewController:(UIViewController *)toViewController fromViewController:(UIViewController *)fromViewController identifier:(NSString *)identifier {
UIStoryboardSegue *theSegue;
NSLog(@"Unwind called");
if ([fromViewController isKindOfClass:[SetDetailViewController class]]) {
theSegue = [ZoomOutSegue segueWithIdentifier:identifier source:fromViewController destination:toViewController performHandler:^(void){}];
} else {
theSegue = [super segueForUnwindingToViewController:toViewController fromViewController:fromViewController identifier:identifier];
}
return theSegue;
}
However, this isn't called. What am I doing wrong here?