Sunday, 8 September 2013

UITextField set placeholder color

UITextField set placeholder color

I've been mocking about on the internet for a while and found this bit of
code:
.h
IBOutlet UITextField *TextField;
.m
[TextField setValue:[UIColor lightGrayColor]
forKeyPath:@"_placeholderLabel.textColor"];
It's not working I'm using IOS 6.1 Running in the Simulator. Is it because
I haven't subclassed the given UITextField?
Regards, Daniel

No comments:

Post a Comment