我试图让导航控制器的方向与它kCATransitionFromTop
一致,CATransition
并且它被设置为这样做但是由于某种原因它仍然是从右到左。淡入淡出部分完美运行。有什么我做错了让这个不起作用吗?我需要在另一个视图控制器中添加代码吗?谢谢
- (void)bottomButtonScreen4:(UIGestureRecognizer *)gestureRecognizer {
settingsViewController = [[SettingsViewController alloc] init];
CATransition* transition = [CATransition animation];
transition.duration = 0.5;
transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
transition.type = kCATransitionFromTop;
[self.navigationController.view.layer addAnimation:transition forKey:nil];
[self.navigationController pushViewController:settingsViewController animated:YES];
}