Advertisement
Guest User

Untitled

a guest
Oct 20th, 2019
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. import UIKit
  2. extension UITextField{
  3. @IBInspectable var placeHolderColor: UIColor? {
  4. get {
  5. return self.placeHolderColor
  6. }
  7. set {
  8. self.attributedPlaceholder = NSAttributedString(string:self.placeholder != nil ? self.placeholder! : "", attributes:[NSAttributedString.Key.foregroundColor: newValue!])
  9. setNeedsLayout()
  10. }
  11. }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement