Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- extension UITextField{
- @IBInspectable var placeHolderColor: UIColor? {
- get {
- return self.placeHolderColor
- }
- set {
- self.attributedPlaceholder = NSAttributedString(string:self.placeholder != nil ? self.placeholder! : "", attributes:[NSAttributedString.Key.foregroundColor: newValue!])
- setNeedsLayout()
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement