设置UITextField占位符placeholder颜色


Tip

使用attributedPlaceholder

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

你可能感兴趣的:(设置UITextField占位符placeholder颜色)