UITextField *textField = [[UITextField
alloc] initWithFrame:CGRectMake(10,
30, 300,
150)];
textField.placeholder =
@"this is a textField";
[textField setValue:[UIColor
redColor]
forKeyPath:@"_placeholderLabel.textColor"];
[textField setValue:[UIFont
boldSystemFontOfSize:30]
forKeyPath:@"_placeholderLabel.font"];
textField.borderStyle =
UITextBorderStyleRoundedRect;
[self.view
addSubview:textField];
版权声明:本文为博主原创文章,未经博主允许不得转载。
时间: 2024-10-09 19:36:20