设置UITextField占位符placeholder颜色

2016-11-16  本文已影响19人  Roy_Liang

Tip

使用attributedPlaceholder

NSAttributedString *placeHolder = [[NSAttributedString alloc]initWithString:@"请输入密码" attributes:@{NSForegroundColorAttributeName:[UIColor whiteColor]}];
 _textField.attributedPlaceholder = placeHolder;

上一篇下一篇

猜你喜欢

热点阅读