1

What advantages do I have when using tableView inside UIViewController not using UITableViewController?

Sohn
  • 187
  • 1
  • 12
  • The static cells requires a `UITableViewController`. – Mannopson Feb 03 '18 at 13:02
  • Check @maddy's answer - https://stackoverflow.com/questions/14465447/are-there-any-advantages-to-using-a-uitableviewcontroller-over-a-uiviewcontrolle – Nitish Feb 03 '18 at 13:03

2 Answers2

3

1- Ability to customize the tableView height and width as you want

2- Ability to have more than 1 tableView instead of only one with UITableViewController

3- When adding a subview it's added to self.view which won't make that subview scroll with tableView like in UITableViewController

Shehata Gamal
  • 98,760
  • 8
  • 65
  • 87
0

In UITableViewController you may have only UITableView and no other UI elements. In UIViewController you may have anything you want. Basically, you need UITableViewController only if you have only static content and only one view - UITableView.