码迷,mamicode.com
首页 > 其他好文 > 详细

UITextField set placeholderColor and UITextField set clearButton Image

时间:2016-12-08 01:59:46      阅读:177      评论:0      收藏:0      [点我收藏+]

标签:from   stat   div   code   path   set   controls   .text   value   


  self.usernameTextField.tintColor = [UIColor whiteColor]; [self.usernameTextField setValue:UIColorFromRGBA(0xffffff, .6f) forKeyPath:@"_placeholderLabel.textColor"];
self.passwordTextField.tintColor
= [UIColor whiteColor]; [self.passwordTextField setValue:UIColorFromRGBA(0xffffff, .6f) forKeyPath:@"_placeholderLabel.textColor"];
UIButton
*pwdClearButton = [self.passwordTextField valueForKey:@"_clearButton"]; [pwdClearButton setImage:[UIImage imageNamed:@"login_icon_clear"] forState:UIControlStateNormal];
UIButton
*userNameClearButton = [self.usernameTextField valueForKey:@"_clearButton"]; [userNameClearButton setImage:[UIImage imageNamed:@"login_icon_clear"] forState:UIControlStateNormal];

 

UITextField set placeholderColor and UITextField set clearButton Image

标签:from   stat   div   code   path   set   controls   .text   value   

原文地址:http://www.cnblogs.com/songxing10000/p/6143141.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!