I am pushing a UIViewController in a navigation stack using the following code
[UIView animateWithDuration:0.75
animations:^{
Actually the transition should be done like this
//MainView
[UIView transitionWithView:self.navigationController.view
duration:0.75
options:UIViewAnimationOptionTransitionFlipFromRight
animations:^{
[self.navigationController pushViewController:viewcontroller animated:NO];
}
completion:nil];
// in viewcontroller
[UIView transitionWithView:self.navigationController.view
duration:0.75
options:UIViewAnimationOptionTransitionFlipFromLeft
animations:^{
[self.navigationController popToRootViewControllerAnimated:NO];
}
completion:nil];