标签:
UITextField *text = [[UITextField alloc] initWithFrame:CGRectMake(50, 200, 200, 40)];
text.borderStyle = UITextBorderStyleRoundedRect;
NSMutableAttributedString * attributedStr = [[NSMutableAttributedString alloc]initWithString:@"密码"];
[attributedStr addAttribute:NSForegroundColorAttributeName value:[UIColor redColor] range:NSMakeRange(0, attributedStr.length)];
text.attributedPlaceholder = attributedStr;
[self.view addSubview:text];
iOS学习-UITextField设置placeholder的颜色
标签:
原文地址:http://www.cnblogs.com/Zsmile/p/4202994.html