How to dynamically change placeholder color of the UITextField
?
This is always the same system color.
No option in xib editor.
_placeholderLabel.textColor
In swift
myTextField.attributedPlaceholder =
NSAttributedString(string: "placeholder", attributes:[NSForegroundColorAttributeName : UIColor.redColor()])
Objective-C
UIColor *color = [UIColor grayColor];
nameText.attributedPlaceholder =
[[NSAttributedString alloc]
initWithString:@"Full Name"
attributes:@{NSForegroundColorAttributeName:color}];
P.S Copied 3 different answers from Stackoverflow.