Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [self.navigationController pushViewController:viewController animated:YES];
- UIViewController *newVC = ...;
- NSMutableArray *vcs = [NSMutableArray arrayWithArray:self.navigationController.viewControllers];
- [vcs insertObject:newVC atIndex:[vcs count]-1];
- [self.navigationController setViewControllers:vcs animated:NO];
- [self.navigationController popViewControllerAnimated:YES];
- CATransition *transition = [CATransition animation];
- transition.duration = 0.45;
- transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault];
- transition.type = kCATransitionFromLeft;
- [transition setType:kCATransitionPush];
- transition.subtype = kCATransitionFromLeft;
- transition.delegate = self;
- [self.navigationController.view.layer addAnimation:transition forKey:nil];
- self.navigationController.navigationBarHidden = NO;
- [self.navigationController pushViewController:pageView animated:NO];
- [UIView beginAnimations:@"rightToLeft" context:NULL];
- CGRect newFrame = aView.frame;
- newFrame.origin.x -= newFrame.size.width;
- aView.frame = newFrame;
- [UIView commitAnimations];
- CATransition *transition = [CATransition animation];
- transition.duration = 0.3f;
- transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
- transition.type = kCATransitionReveal;
- [self.navigationController.view.layer addAnimation:transition forKey:nil];
- [self.navigationController pushViewController:phoneServicesViewController animated:NO];
- Try this :
- //Push effect in reverse way
- CATransition* transition = [CATransition animation];
- transition.duration = 0.75;
- transition.type = kCATransitionPush;
- transition.subtype = kCATransitionFromLeft;
- [self.navigationController.view.layer addAnimation:transition forKey:kCATransition];
- [self.navigationController pushViewController:vc animated:NO];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement