开发者

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]];
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜