首页 > 移动平台 > 详细

IOS 开发更改UITextField的Placeholder颜色

时间:2014-07-12 16:15:37      阅读:392      评论:0      收藏:0      [点我收藏+]

      

    UITextField *textField = [[UITextField alloc] initWithFrame:CGRectMake(100, 200, 200, 40)];    UIColor *color = [UIColor redColor];

    textField.backgroundColor = [UIColor yellowColor];

    

    textField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"密码" attributes:@{NSForegroundColorAttributeName: color}];

    

    [self.view addSubview:textField];

 

  来自 http://code4app.com/snippets/one/UITextField设置placeholder颜色/537c765e933bf0a0468b525c#s0

     

IOS 开发更改UITextField的Placeholder颜色,布布扣,bubuko.com

IOS 开发更改UITextField的Placeholder颜色

原文:http://www.cnblogs.com/keepcrazy/p/3838184.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!