代码片段:
<span style="font-size:14px;color:#333333;"> UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100, 100, 300, 40)];
textField.placeholder = @"username is in here!";
[textField setValue:[UIColor greenColor] forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont boldSystemFontOfSize:11] forKeyPath:@"_placeholderLabel.font"];
[self.view addSubview:textField];</span>