标签:字体 颜色 placeholder ios textfield
设置textfield的placeholder的字体和颜色
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];
版权声明:本文为博主原创文章,未经博主允许不得转载。
标签:字体 颜色 placeholder ios textfield
原文地址:http://blog.csdn.net/lu_ca/article/details/47168729