Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove UILabel padding

If it were a TextView I could do

self.textView.textContainer.lineFragmentPadding = 0;

But what I have is a multiline label. How do I remove the padding?

like image 429
Katedral Pillon Avatar asked Feb 19 '15 21:02

Katedral Pillon


1 Answers

If you're using iOS 8, try changing the insets value of layoutMargins property. If it doesn't work or you're targeting earlier versions, look at this answer.

like image 156
Mercurial Avatar answered Sep 16 '22 11:09

Mercurial