PDA

View Full Version : Can you change the color of the placeholder text in UITextField?




fenrus110
Jan 5, 2009, 12:02 PM
I'm wanting to change the text color for the placeholder (it's using the default light grey). Is this even possible?



dejo
Jan 5, 2009, 12:19 PM
It should be possible if you override the drawPlaceholderInRect: method.

5et
Jun 24, 2009, 07:23 AM
I add to my class
But I don't know how I can change color here.
Please. help me :(



@implementation UITextField (reverse)

- (void)drawPlaceholderInRect:(CGRect)rect{
//What I must add here?
[super drawRect:rect];
}

@end