I have created a label from storyboard and now I am trying to give padding to that label. I have create a class and tried both the methods below but nothing is working. Please help.
override func drawTextInRect(rect: CGRect) {
super.drawTextInRect(UIEdgeInsetsInsetRect(rect, UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 0)))
}
let padding = UIEdgeInsets(top: 0, left: 10, bottom: 0, right: 10)
override func intrinsicContentSize() -> CGSize {
let superContentSize = super.intrinsicContentSize()
let width = superContentSize.width + padding.left + padding.right
let heigth = superContentSize.height + padding.top + padding.bottom
return CGSize(width: width, height: heigth)
}