automaticallyAdjustsScrollViewInsets not working

后端 未结 5 1589
终归单人心
终归单人心 2020-11-29 01:25

I\'ve created an extremely simple demo app to test the functionality of automaticallyAdjustsScrollViewInsets, but the last cell of the tableView is covered by m

5条回答
  •  情歌与酒
    2020-11-29 01:56

    I was having the same issue, a Table View with unwanted top padding.

    All answers say to fix by setting automaticallyAdjustsScrollViewInsets = NO, but that was not eliminating the padding for me.

    Similar to the other answers here, these directions need to be tweaked slightly if you're using a non-standard view hierarchy.

    I had a UIViewController with an embedded UITableViewController. It was not working to set automaticallyAdjustsScrollViewInsets on the Table View Controller.

    Instead, I set automaticallyAdjustsScrollViewInsets = NO on the parent UIViewController that was embedding my Table View Controller. That successfully eliminated the padding on the Table View.

提交回复
热议问题