UINavigationController切换视图 - 从右向左滑动
问题描述:
我试图在视图之间切换。 这些类从UINavigationController继承。 我使用这个代码在我IBAction为:UINavigationController切换视图 - 从右向左滑动
CellSubview *personView = [[CellSubview alloc] init]; // The new navigation controller
self.modalTransitionStyle = 0; // tried all 3 of the options
[self presentModalViewController:personView animated:YES];
[personView release];
时:
@interface CellSubview : UINavigationController
我只是不能让滑动到右侧视图。 (因为大部分的应用一样)
它总是来自自下而上和非选择的:
personView.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
// or
personView.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
我只想oldViewController.view向左滑动和新newViewController.view得到从右边进入。
感谢您的提醒
伊泰
答
不要使用presentModalViewController:
。使用
[self.navigationController pushViewController:personView animated:YES];
如果你想隐藏新的屏幕上的导航栏,然后使用
[self.navigationController setNavigationBarHidden:YES animated:YES];
答
的modalTransitionStyle酒店要在视图控制器上设置,即模态呈现,即在personview在你的情况。