修改UITextfield的Placeholder字体的颜色
2018-08-22 17:05 法子 阅读(441) 评论(0) 编辑 收藏 举报//两种办法 //attributedPlaceholder self.usernameTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"xxx" attributes:@{NSForegroundColorAttributeName: [UIColor redColor]}]; //KVO [self.usernameTextField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];