iOS-修改UITextField的placeholder字体颜色、大小

来源:互联网 发布:漫画王软件 编辑:程序博客网 时间:2024/05/16 01:35
textField.placeholder = @"username is in here!";  [textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];  [textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];