现在我想将xib文件加载到splitview控制器的两个视图中。
我的代码如下
DetailsViewController *details = [[DetailsViewController alloc] init];
RootViewController *root = [[RootViewController alloc] init];
splitViewController.viewControllers = [NSArray arrayWithObjects:details, root, nil];
// self.view = splitViewController.view;
[self.view addSubview:splitViewController.view];
[details release];
[root release];
我之前有关此问题的问题: how can i add splitview to my viewbased app in ipad coding
答案 0 :(得分:0)
而不是
[[MyVC alloc] init]
使用
[[MyVC alloc] initWithNibName:@"MyNibNameWithoutExtension" bundleOrNil:nil];