设置UITextField的placeholdertext 颜色

2020-06-24  本文已影响0人  Sh1mmer
UIColor *color = [UIColor whiteColor];
    self.userNameTB.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入您的账号" attributes:@{NSForegroundColorAttributeName: color}];
    self.userPwdTB.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入您的密码" attributes:@{NSForegroundColorAttributeName: color}];
上一篇下一篇

猜你喜欢

热点阅读