0

I need to delete the padding between two section in a grouped style table view; then I need to insert a header upon each section, with a label that would be align center. This is my final purpose:

enter image description here

As you can see in the pictures the header label is not centered, an there's a padding between the sections. I tried to implement viewForHeaderInSection and viewForHeaderInSection methods but I'm not able to customize the header as I need: is there an other way?

Fabio Cenni
  • 841
  • 3
  • 16
  • 30
  • The section titles appear to be centred, but they are overlapped by the screen on the right. You'll need to put a trailing constraint of 100px to the table view to fix this. Also, why don't you use the non-grouped table view? You don't need the grouped table view to have sections. – paulvs Aug 15 '16 at 00:12
  • Ok, to center the label i tried to set label width to self.tableView.bounds.width - 100, now I would try with your solution. If i use plain table view when I scroll the table the headers cover the section cells – Fabio Cenni Aug 15 '16 at 00:16

0 Answers0