2

I looked at all of the answers here Why is there extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7 and none of them worked.

I have a table view within a UIViewController, and a collection view inside the header of the table view so that I can have a parallax scrolling effect. When the view first loads, there's no empty space above the first cell. After tapping a new item in the collection view, the table view is reloaded and the empty space appears. A curious thing is that this bug is only presenting itself on the iPad Pro (simulator). I tested on the simulator for the iPad 2 and iPad Air (1 & 2) and there's no issue. Please see the attached images. working upon first load broken upon tapping new item in collection view

Consolidated list of things I have tried:

  1. Setting self.edgesForExtendedLayout = UIRectEdge.None in viewDidLoad()
  2. Setting self.automaticallyAdjustsScrollViewInsets = false
  3. Returning 0 for heightForHeaderInSection
  4. Unchecking "extend under top bars" and "under bottom bars" in IB
Community
  • 1
  • 1
Michael McKenna
  • 811
  • 1
  • 11
  • 24

0 Answers0