ios - UIPageViewController EdgeInset 问题中的 UITableView

标签 ios objective-c swift uitableview uipageviewcontroller

我有一个符合 UIPageViewControllerDataSource 的包含 UIViewController 并且有一个 UIPageViewController 作为 childViewController。然后容器将其他 ViewControllers 适本地加载到 PageView 作为它的数据源。除了一个小警告外,一切正常。容器加载的 ViewController 之一是 UITableViewController。此 UITableView 似乎没有设置 insets。我不确定为什么不是 PVC 没有从容器中获得正确的插入的问题。 UIPageViewController 肯定有 automaticallyAdjustsScrollViewInsets,但是,即使我将其设置为 false 并在 Storyboard中手动执行,它仍然不起作用。

我在这个项目中使用 Swift 并且 AutoLayout 处于打开状态,但不在 UITableViewController 的 .xib 中。

如有任何帮助,我们将不胜感激,
迈克

最佳答案

这是 UITableViewController 的一个已知“功能”。它抓取整个 Root View ,以便忽略插图。

解决方案是使用具有 TableView 并符合其数据源和委托(delegate)的 UIViewController

关于ios - UIPageViewController EdgeInset 问题中的 UITableView,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24840333/

相关文章:

ios - 重新加载表格 View 而不影响单元格中的倒数计时器

swift - MacOS:在 Swift 中向图像添加文本叠加层

swift - 在 Swift 中,如何在结构中将可选枚举初始化为 nil?

ios - UITableViewCell 中的 UITableView 委托(delegate)和数据源

ios - 强制模拟位置在 XCode 6.4 中固定

ios - 在 NSMutableArray 的副本上使用快速枚举来删除对象的详细信息

android - 有没有像Android for iOS的intent.putextra这样的方法?

ios - 如何删除警告 : Large title font text style before iOS 11. 0 [5]

ios - 如何调用(void)viewDidUnload函数?当我移动到其他 View Controller 时它不会调用

iphone - TBXML 解析器给出 EXC_BAD_ACCESS