- (void)whenPush{
WTVViewController * loginView = [[WTVViewController alloc]init];
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:loginView animated:NO];
// * 此处animated设置为NO
}
- (void)whenPop{
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];
//* 此处animated设置为NO
}
网友评论