Empty white space above UITableView inside a UIView

前端 未结 8 1081
梦毁少年i
梦毁少年i 2020-12-13 13:53

I\'m trying to position a TableView inside my ViewController view but leaving a 44 height gap between the bottom of the navigation bar and the top of the table. I then wante

相关标签:
8条回答
  • 2020-12-13 14:31

    I just found a solution for this. In my case, i was using TabBarViewController, A just uncheck the option 'Adjust Scroll View Insets'. Issues goes away.

    https://i.stack.imgur.com/qgQI8.png

    0 讨论(0)
  • 2020-12-13 14:35

    Try to look in the 'attribute inspector' (in the right menu) of the Participants ViewController. Check for the option 'Extend Edges' and uncheck the 'Under Top Bars', and then relocate your tableview.

    Another possible solution is to just uncheck the option 'Adjust Scroll View Insets'. The reason is that when the viewController extends its edges, let's say under the top bar, the tableView's scrollView automatically adjusts its inset top, so that the content of the tableView will start exactly under the top bar. But in your case this is not needed, since your tableView itself starts under the bar.

    Focus on the ViewController and got to the Attribute Inspector tab:

    0 讨论(0)
提交回复
热议问题