UISplitViewController是iPad特有的系统方法,主要效果就是呈现iPad的经典切割界面
代码创建实例:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { MyFirstViewController* firstVC = [[MyFirstViewController alloc] initWithNibName:@"FirstNib" bundle:nil]; MySecondViewController* secondVC = [[MySecondViewController alloc] initWithNibName:@"SecondNib" bundle:nil]; UISplitViewController* splitVC = [[UISplitViewController alloc] init]; splitVC.viewControllers = [NSArray arrayWithObjects:firstVC, secondVC, nil]; [window addSubview:splitVC.view]; [window makeKeyAndVisible]; return YES; }
时间: 2024-10-12 19:44:17