美文网首页
更改NavgationController Push 和 Pop

更改NavgationController Push 和 Pop

作者: json_jie | 来源:发表于2016-06-15 10:45 被阅读140次

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];

相关文章

网友评论

      本文标题:更改NavgationController Push 和 Pop

      本文链接:https://www.haomeiwen.com/subject/wbcudttx.html