jeudi 28 juillet 2016

Add left/right margin to uitableviewcell with dynamic height

I want to add left and right margin to the cells in Table View. I used:

tableView.contentInset = UIEdgeInsetsMake(0.0, 10.0, 0.0, 10.0)

in swift, but it adds margin out of the page, and it's not possible to add contentInset to a TableViewCell.

I tried to add a UIView and add my controls under that, but now dynamic resize for the cells height doesn't work.

How can I add left/right margin to dynamic resized cells?

Thanks

Aucun commentaire:

Enregistrer un commentaire