Why is there extra padding at the top of my UITableView with style UITableViewStyleGrouped in iOS7

前端 未结 30 3108
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 12:47

Starting in iOS7, there is additional space at the top of my UITableView\'s which have a style UITableViewStyleGrouped.

Here is an example:<

30条回答
  •  夕颜
    夕颜 (楼主)
    2020-11-22 13:23

    Try changing the contentInset property that UITableView inherits from UIScrollView.

    self.tableView.contentInset = UIEdgeInsetsMake(-20, 0, 0, 0);
    

    It's a workaround, but it works

提交回复
热议问题