美文网首页
设置UITextField占位符placeholder颜色

设置UITextField占位符placeholder颜色

作者: Roy_Liang | 来源:发表于2016-11-16 13:49 被阅读19次

    Tip

    使用attributedPlaceholder

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

    相关文章

      网友评论

          本文标题:设置UITextField占位符placeholder颜色

          本文链接:https://www.haomeiwen.com/subject/ctlrpttx.html