Search code examples
iosuitableviewinsets

UITableView section header inset missing


How do I fix the problem illustrated in the image?

The section header for the tableview is missing an inset.

section header for the tableview is missing an inset.


Solution

  • You probably set the separator insets to 0, either in code or in the Interface Builder (can be found in the Attributes inspector:

    Separator insets set to 0

    This also causes the titles to have no inset. The default values are 15 for left and 0 for right.