Labels with padding in iOS

04 Dec, 2015
Xebia Background Header Wave

There is no standard way of creating UILabels with padding around the text in iOS. And usually that’s not really necessary because you should be using auto layout to position the label and the space around them. However, there are some occasions when you have a UILabel and just need some padding around it. One such occasion would be the creation of table view headers. Instead of manually creating a UIView around a UILabel to achieve this let’s have a look at some alternatives.


Get in touch with us to learn more about the subject and related solutions

Explore related posts