I want to use a custom segue from my destination view controller back to the source view controller using the "Back" button in the NavBar. Is this possible? I have not been able to find an answer anywhere.
So far, I connected a custom segue from the destination view controller back to the source view controller and add the code below. However, the back-button does not trigger my custom segue.
-(void)perform
{
UIViewController *sourceViewController = (UIViewController*)[self sourceViewController];
UIViewController *destinationController = (UIViewController*)[self destinationViewController];
CATransition* transition = [CATransition animation];
transition.type = kCATransitionMoveIn;
transition.subtype = kCATransitionFromTop;
transition.duration = 0.5;
[sourceViewController.navigationController.view.layer addAnimation:transition forKey:kCATransition];
[sourceViewController.navigationController pushViewController:destinationController animated:NO];
}