表格查看表格视图中第一个单元格上方的额外填充 - 仅限iPad Pro

时间:2016-09-10 22:50:32

标签: ios swift user-interface

我在这里查看了所有答案Why is there extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7 他们都没有工作。

我在UIViewController中有一个表视图,并且在表视图的标题内有一个集合视图,这样我就可以有一个视差滚动效果。首次加载视图时,第一个单元格上方没有空白区域。在集合视图中点击新项目后,将重新加载表视图并显示空白区域。奇怪的是,这个bug只出现在iPad Pro(模拟器)上。我在模拟器上测试了iPad 2和iPad Air(1& 2)并且没有问题。请参阅附图。 working upon first load broken upon tapping new item in collection view

我尝试过的综合列表:

  1. 在viewDidLoad()中设置self.edgesForExtendedLayout = UIRectEdge.None
  2. 设置self.automaticallyAdjustsScrollViewInsets = false
  3. 为heightForHeaderInSection返回0
  4. 在IB
  5. 中取消选中“在顶栏下延伸”和“在底栏下”

0 个答案:

没有答案