Debe agregar inserciones a su tableView . Prueba el siguiente código
let insets = UIEdgeInsets(top: 0, left: 0, bottom: 50, right: 0) tableView.contentInset = insetsAgregue una fuente de datos y un delegado para su vista de tabla y utilice los siguientes métodos de delegado: - heightForFooterInSection & viewForFooterInSection
// set view for footer func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { let footerView = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.size.width, height: 40)) // assuming 40 height for footer. footerView.backgroundColor = <Some Color> return footerView } // set height for footer func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { return 40 }Cuando utiliza la inserción de contenido para agregar relleno, puede crear algún problema, cuando no hay datos disponibles en tableView.
Prueba esto
Simplemente y la vista en un tableFooterView para el relleno en la parte inferior de tableView .
//Add Padding in the bottom of tableview let view = UIView(frame: CGRect(x: 0, y: 0, width: tableView.frame.size.width, height: 20)) view.backgroundColor = UIColor.white tableView.tableFooterView = view