ios - 带有不是 UITableViewController 的自定义主视图 Controller 的 UISplitViewController

标签 ios ipad uitableview

我正在开发一个需要 UISplitViewController 的 iPad 应用程序。对于主视图 Controller ,我想使用具有图像、表格 View 和标签的自定义 View Controller 。开箱即用的 UISplitviewcontroller/MasterDetail 模板为我提供了一个带有嵌入式 UItableViewcontroller 的导航 Controller 。当我尝试为新的 Viewcontroller 更改 tableview Controller 时,新 Controller 的 View 没有显示。我能够设置 UIBarbuttons,但没有调用 TableView 的数据源方法。也没有显示 imageview 和标签。我已经确保我的 View Controller 是 tableview 的委托(delegate)和数据源,并在从 nib 唤醒时设置了首选大小,但仍然没有 UI。我正在将 UISprlitviewcontroller 添加到现有项目中,这会成为问题吗?

最佳答案

问题在于尺寸等级的使用。因为这是一个 iPad 应用程序,所以我关闭了尺寸分类选项,应用程序按预期工作。我需要花时间学习如何正确使用这项新功能。

关于ios - 带有不是 UITableViewController 的自定义主视图 Controller 的 UISplitViewController,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/27926858/

相关文章:

ios - 如何在 iOS 中将 2 个单声道文件转换为单个立体声文件?

ios - 如何将事件从在 UIWebView 中运行的 HTML 发送到 native Objective-C 代码?

ios cocoa : How to adjust the size of the popover depending on the number of rows in uitableview

iphone - 有没有办法从字面上暂停 View ?

iphone - 如何使用 UITableView 在 iOS 中正确显示三层数据结构

ios - 通过传递对象填充原型(prototype)单元格

ios - Swift 自定义 UITableView 未在构建中显示

ios - “could not inspect application package” X代码

ios - 使用 Voice Over 提供容器摘要,例如 tableview

iphone - 从 iOS 应用程序中列出(并连接到)蓝牙设备