使用模態(tài)跳轉(zhuǎn)的動畫push導(dǎo)航控制器:
//方法一:模態(tài)跳轉(zhuǎn)皆看,前提是利用navigationcontroller這個容器
//??????????????? UserManagerViewController *userManagerVC = [[UserManagerViewController alloc] init];
//??????????????? UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:userManagerVC];
//??????????????? [self presentViewController:nav animated:YES completion:nil];
//方法二:push腰吟,只不過有莫泰跳轉(zhuǎn)的方式徙瓶,這種方法更好
UserManagerViewController *userManagerVC = [[UserManagerViewController alloc] init];
CATransition *animation = [CATransition animation];
animation.duration = 0.2;
animation.type = kCATransitionMoveIn;
animation.subtype = kCATransitionFromTop;
animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionDefault];
[self.navigationController.view.layer addAnimation:animation forKey:nil];
[self.navigationController pushViewController:userManagerVC animated:NO];//自定義動畫,此處要設(shè)為NO