美文网首页
iOS修改textfield的placeholder的字体颜色、

iOS修改textfield的placeholder的字体颜色、

作者: 有缘人2830 | 来源:发表于2016-11-24 12:02 被阅读22次

textField.placeholder = @"username is in here!";
[textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];

相关文章

网友评论

      本文标题:iOS修改textfield的placeholder的字体颜色、

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