更改NavgationController Push 和 Pop

2016-06-15  本文已影响140人  json_jie

Puh的代码
CATransition* transition = [CATransition animation]; transition.type = kCATransitionPush; transition.subtype = kCATransitionFromLeft; [self.navigationController.view.layer addAnimation:transition forKey:kCATransition]; ETCPPersonCenterViewController *con = [ETCPStoryboard controllerInStoryboard:@"ETCPPersonCenterStoryboard" withIdentifier:@"ETCPPersonCenterViewController"]; [self.navigationController pushViewController:con animated:NO];
Pop代码
CATransition *animation = [CATransition animation]; animation.type = kCATransitionMoveIn; animation.subtype = kCATransitionFromRight; [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]]; [self.navigationController.view.layer addAnimation:animation forKey:nil]; [self.navigationController popViewControllerAnimated:NO];

上一篇 下一篇

猜你喜欢

热点阅读