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