Showing pushviewcontroller animation look like presentModalViewController Showing pushviewcontroller animation look like presentModalViewController ios ios

Showing pushviewcontroller animation look like presentModalViewController


If you want to a fade animation, this approach works.

CATransition* transition = [CATransition animation];transition.duration = 0.3;transition.type = kCATransitionFade;transition.subtype = kCATransitionFromTop;[self.navigationController.view.layer addAnimation:transition forKey:kCATransition];[self.navigationController pushViewController:gridController animated:NO];


Try this :

UIViewController *yourViewController = [[UIViewController alloc]init];[UIView  beginAnimations: @"Showinfo"context: nil];[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];[UIView setAnimationDuration:0.75];[self.navigationController pushViewController: yourViewController animated:NO];[UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.navigationController.view cache:NO];[UIView commitAnimations];


For display PushViewConttroler animation as Present below code is working,

For Push

 ViewController *VC = [self.storyboard instantiateViewControllerWithIdentifier:@"ViewController"]; CATransition* transition = [CATransition animation]; transition.duration = 0.4f; transition.type = kCATransitionMoveIn; transition.subtype = kCATransitionFromTop; [self.navigationController.view.layer addAnimation:transition                                                    forKey:kCATransition]; [self.navigationController pushViewController:VC animated:NO];

And for POP

CATransition* transition = [CATransition animation];transition.duration = 0.4f;transition.type = kCATransitionReveal;transition.subtype = kCATransitionFromBottom;[self.navigationController.view.layer addAnimation:transition                                            forKey:kCATransition];[self.navigationController popViewControllerAnimated:NO];

There is 1 issue though, that its display light black background when its going up/down,
Working on that, As soon as its done post new code here.