美文网首页
设置UITextField的placeholdertext 颜色

设置UITextField的placeholdertext 颜色

作者: Sh1mmer | 来源:发表于2020-06-24 14:38 被阅读0次
UIColor *color = [UIColor whiteColor];
    self.userNameTB.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入您的账号" attributes:@{NSForegroundColorAttributeName: color}];
    self.userPwdTB.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入您的密码" attributes:@{NSForegroundColorAttributeName: color}];

相关文章

网友评论

      本文标题:设置UITextField的placeholdertext 颜色

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