Add empty (blank) space under (in the end of) UITableView
Set the content inset on your table view:
var insets: UIEdgeInsets = tableView.contentInset
insets.bottom = 100
tableView.contentInset = insets
or, simply:
tableView.contentInset.bottom = 100
That will leave some blank space under the table view after you scroll to the last cell.
You can use tableView
Footer
for that
UIView *view = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.tableView.frame.size.width, 100)];
[self.tableView setTableFooterView:view];
It's honestly this simple:
Add the following, likely in viewDidLoad
:
tableView.contentInset.bottom = 100
Really that's all there is to it.
override func viewDidLoad() {
super.viewDidLoad()
tableView.contentInset.bottom = 100
}
Thanks @Siklab.ph for me the best answer.
self.tableView.contentInset.bottom = 100