You can embed your TableViewController in a Navigation controller:
1. Select the TableViewController in the storyboard
2. Xcode top bar: Editor -> Embed in -> Navigation controller
If you don't want to embed your TableViewController in a nav. control, you can add padding to the table view in your viewDidLoad
in your TableViewController class:
// ... in TableViewController.swift
override func viewDidLoad() {
super.viewDidLoad()
// add top padding to table view
let myTopPadding: CGFloat = 50
self.tableView.contentInset = UIEdgeInsetsMake(myTopPadding, 0, 0, 0);
// ...
}
Note that with this solution, however, you data will still "hit" the status bar when scrolling, although not when entering your table view. This is apparently and issue that is hard to avoid (without navigation controller) when subclassing the UITableViewController:
If you want padding also when scrolling then, based on the thread above, you're better off creating your own table via view controller -> insert table view -> ...
, rather than using the finished UITableViewController "package".