【发布时间】:2012-03-07 23:00:18
【问题描述】:
我(仍然)正在将 iPhone 应用程序转换为通用应用程序。
我想将 UISplitViewController 推送到 UIView 上。正如here 所讨论的,我正在尝试创建这个流程:
UIView -> UISplitViewController(包含我在 iPhone 版本中使用的两个 UITableView) -> UIView
我希望附加到此 IBAction 的按钮使 tableview 出现在 iPhone 上(所有设置和工作),SplitViewController 出现在 iPad 上:
-(IBAction)makeStory:(id)sender{
NSLog(@"makeStory:");
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
//Code here to push split view.
} else {
//I am an iPhone!
makeStoryTableViewController = [[MakeStoryTableViewController alloc] initWithNibName:@"MakeStoryTableViewController" bundle:nil];
[self.navigationController pushViewController:makeStoryTableViewController animated:YES];
[self.navigationController setNavigationBarHidden:NO animated:YES];
}
}
我已阅读教程 here 和 here - 但我不知道如何正确地将其添加到现有应用程序中。我将不胜感激一些帮助/指导,以便我可以在这个通用应用程序中正确实现 UISplitViewController。
【问题讨论】:
标签: ios ipad uitableview uisplitviewcontroller