简体   繁体   中英

How to reduce padding between each table view cell

Is it possible to reduce the padding surrounding each table view cell in a table view? I understand I could do this through a custom solution but I would like to have the default auto-resizing behavior of a standard table view cells but just reduce the padding between cells.

I'm not sure if I completely understand your question, but when working with table view cells, I generally

  1. Get rid of the line operator
  2. Set the background color of the cell and the table view to be the same
  3. Create a subview that is essential all the design of the cell

By doing this I can make the subview a different color and increase or decrease its size, and in a way, it acts as padding between cells.

Again I'm not totally sure if that helped, but if it and you would like the code for that just respond to my answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM