How to change UITextField’s Placeholder color in objective C?
Now i am using the private method which is given below,
[self.Textfield setValue:[UIColor darkGrayColor] forKeyPath:@"_placeholderLabel.textColor”];
Please any help for the public method for the changing t开发者_StackOverflow中文版he Placeholder color.
Thanks in Advance.
Try:
(void) drawPlaceholderInRect:(CGRect)rect {
[[UIColor blueColor] setFill];
[[self placeholder] drawInRect:rect withFont:[UIFont systemFontOfSize:16]];
}
精彩评论