在AppDelegate
application:didFinishLaunchingWithOptions:
UISplitViewController
中,我使用以下代码实例化PopMenuViewController *menuVC = [[PopMenuViewController alloc] initWithStyle:UITableViewStylePlain];
UINavigationController *menuNavController = [[UINavigationController alloc] initWithRootViewController:menuVC];
PopMenuDetailViewController *detailVC = [[PopMenuDetailViewController alloc] initWithNibName:@"PopMenuDetailViewController" bundle:nil];
UINavigationController *detailNavController = [[UINavigationController alloc] initWithRootViewController:detailVC];
menuVC.detailViewController = detailVC;
splitViewController = [[UISplitViewController alloc] init];
splitViewController.viewControllers = @[menuNavController, detailNavController];
splitViewController.presentsWithGesture = YES;
splitViewController.delegate = self;
self.window.rootViewController = splitViewController;
:
presentsWithGesture
但是,在纵向模式下,当我在屏幕上滑动时(从左到右),左视图控制器不会出现(但YES
设置为{{1}})。
我在Simulator和iOS 7的物理设备上运行该项目。
任何想法?