I\'ve written a custom segue.
-(void)perform {
UIView *preV = ((UIViewController *)self.sourceViewController).view;
UI
You need to keep a reference to destinationViewController
so that it doesn't get deallocated. Obviously, you cannot do this in your custom segue as this object is freed after the transition has finished. The standard push segue does this by adding the view controller to the viewControllers
property of a UITabBarController
, for example.
In your case, you could call
[sourceViewController addChildViewController:destinationViewController];
to establish a proper connection between the view controllers. Don't forget to call removeFromParentViewController
in your reverse segue.