Created
January 31, 2017 07:05
-
-
Save efremidze/8af443342222832a56140760111364b8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
class InsetLabel: UILabel { | |
var insets = UIEdgeInsets() | |
override var intrinsicContentSize: CGSize { | |
var size = super.intrinsicContentSize | |
size.width += insets.left + insets.right | |
size.height += insets.top + insets.bottom | |
return size | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment