Advertisement
Guest User

Untitled

a guest
Oct 8th, 2015
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. import UIKit
  2.  
  3. extension UILabel {
  4. func kern(kerningValue:CGFloat) {
  5. self.attributedText = NSAttributedString(string: self.text ?? "", attributes: [NSKernAttributeName:kerningValue, NSFontAttributeName:font, NSForegroundColorAttributeName:self.textColor])
  6. }
  7. }
  8.  
  9. /*
  10. example usage:
  11. self.nameLabel.kern(1.5)
  12. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement