Empty white space above UITableView inside a UIView

前端 未结 8 1098
梦毁少年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:24

    For Objective-C folks, add this in your ViewDidLoad method.

    [self.tableView setContentInset:UIEdgeInsetsMake(-20, 0, 0, 0)];
    

提交回复
热议问题