Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

986
Views
Agregue espacio debajo del último elemento de la vista de tabla en Swift

Necesito agregar algo de espacio adicional después del último elemento en la celda de vista de tabla.

En la vista de reciclador de Android, se puede lograr lo mismo al

 android:paddingBottom="8dp" android:clipToPadding="false"

Vista de tabla último elemento

over 4 years ago · Santiago Trujillo
3 answers
Answer question

0

Debe agregar inserciones a su tableView . Prueba el siguiente código

 let insets = UIEdgeInsets(top: 0, left: 0, bottom: 50, right: 0) tableView.contentInset = insets
over 4 years ago · Santiago Trujillo Report

0

Agregue 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 }
over 4 years ago · Santiago Trujillo Report

0

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
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!