Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- extension UILabel {
- func kern(kerningValue:CGFloat) {
- self.attributedText = NSAttributedString(string: self.text ?? "", attributes: [NSKernAttributeName:kerningValue, NSFontAttributeName:font, NSForegroundColorAttributeName:self.textColor])
- }
- }
- /*
- example usage:
- self.nameLabel.kern(1.5)
- */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement