修改TextField的占位符(placeholder)大小和颜色

textField.placeholder = @"请输入用户名";  
[textField setValue:[UIColor redColor] forKeyPath:@"_placeholderLabel.textColor"];  
[textField setValue:[UIFont boldSystemFontOfSize:16] forKeyPath:@"_placeholderLabel.font"];

你可能感兴趣的:(修改TextField的占位符(placeholder)大小和颜色)