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

前端 未结 30 2923
隐瞒了意图╮
隐瞒了意图╮ 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:07

    For IOS 7 if you are allocing a tableview in a view controller you may look into

    self.edgesForExtendedLayout = UIRectEdgeNone;
    

    your problem seemed similar to mine

    Update:

    Swift in iOS 9.x:

    self.edgesForExtendedLayout = UIRectEdge.None
    

    Swift 3 :

    self.edgesForExtendedLayout = UIRectEdge.init(rawValue: 0)
    

提交回复
热议问题