Houman
Houman

Reputation: 66320

How to remove the left padding of a cell content?

I'm trying for hours to find out why there is this left margin in the custom cell. The cell only contain an imageView and a label.

     |           |
-- imageView - Label --
     |           |

I have setup constraints like this to all sides. I have made the imageView's background red. Hence the red colour indicates the padding is somehow related to the image. But I can't find anything.

in IB I have set the Separator Insets to Custom and set Left to 0.

Not sure what else I could do. Thanks for advice.

enter image description here

Upvotes: 3

Views: 2630

Answers (1)

emraz
emraz

Reputation: 1613

Try the code given below. For Swift 3

self.customTableView.separatorInset = .zero

Upvotes: 4

Related Questions