a category to transition animation
TunViewControllerTransition is available on CocoaPods. Just add the following to your project Podfile:
pod 'TunViewControllerTransition', '~> 0.0.4'
- (void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
self.navigationController.delegate = self;
}
[self animateTransitionFromView:fromView toView:@"toViewKeyPath"];
[self animateInverseTransition];