Using a UITableViewController with a small-sized table?

后端 未结 11 1321
一生所求
一生所求 2020-12-31 05:51

When using a UITableViewController, the initWithStyle: method automatically creates the underlying UITableView with - according to the documentation - \"the correct dimensio

11条回答
  •  不知归路
    2020-12-31 06:39

    You can set the top margin by using :

        UIEdgeInsets inset = UIEdgeInsetsMake(50, 0, 0, 0);
        self.tableView.contentInset = inset;
    

    it's Not a good practice , just in case you want more space on top you can use it .

    Should not use UITableViewController , Just simply Use UIViewController and Programmatically Create UITableview

提交回复
热议问题