iOS 7 Custom TableView Is Under TabBar

后端 未结 16 1669
萌比男神i
萌比男神i 2020-12-13 04:31

Im trying port my app to iOS7, but my custom TableViewController is showing the last row (cell) under the TabBar :(

Im searchi

16条回答
  •  被撕碎了的回忆
    2020-12-13 05:12

    The root cause of this problem is that automaticallyAdjustsScrollViewInsets is effective only on the First scroll view in your VC's view Hierarchy. It is not documented by Apple, but it is the only way the VC will detect the scroll view needing to be modified unless you're using a UITableViewController.

    So in order to fix your issue without manually adjusting the insets, do this:

    1. Make sure "Adjust Scroll View Insets" is checked.
    2. Make sure that the tableView is the first subview in the view Hierarchy. (Move it upwards above all other elements)

提交回复
热议问题