Grouped UITableView has 20px of extra padding at the bottom

前端 未结 12 1131
长发绾君心
长发绾君心 2020-12-23 09:34

Grouped table views seem to have extra padding on the bottom in iOS 6 (iOS 5 does not have it), but I can\'t find any documentation that suggests this is correct / expected

12条回答
  •  死守一世寂寞
    2020-12-23 09:48

    Swift 3 code

    class PaddingLessTableView : UITableView
    {
        override func layoutSubviews() {
            self.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: 0, right: 0)
            super.layoutSubviews()
        }
    }
    

提交回复
热议问题