Search code examples
swift3xcode8

How to setUp UiTableViewController below the battery bar


newBie here. I have added an UItableViewController into storyBoard. I use this as a setting page.

HomeVC ----> Setting VC

In code : I use the below code to bring the tableView below the battery Bar:

 self.tableView.contentInset = UIEdgeInsets(top: 20,left: 0,bottom: 0,right: 0)

Problem:

How to move the TableView down below the battery bar so that I can add a button above the table in StoryBoard

Please help.


Solution

  • For this you should use a normal view controller and drag a table on the view controller this way you can make the table size whatever you like. This will also allow you to place buttons wherever you like.

    Don't forget to assign the TableViewDataSource and TableViewDelegate to your view controller.

    Good luck!