1、通过属性 a、 //文字属性(一般) NSMutableDictionary *attrs = [NSMutableDictionary dictionary]; attrs[NSForegroundColorAttributeName] = [UIColor blueColor]; NSAtt ...
分类:
其他好文 时间:
2016-06-10 00:57:32
阅读次数:
418
UILabel *lab = [[UILabel alloc]initWithFrame:CGRectMake(100, 100, 100, 100)];// lab.layer.borderColor = [UIColor blueColor].CGColor;// lab.layer.borde ...
分类:
移动开发 时间:
2016-06-08 12:25:17
阅读次数:
212
代码创建 //创建UIButton UIButton * btnType=[[UIButton alloc]init]; //设置UIControlStateNormal状态下的文字颜色 [btnType setTitleColor:[UIColor blackColor] forState:UIC ...
分类:
其他好文 时间:
2016-06-06 21:52:36
阅读次数:
290
+ (UIColor *) colorWithHexString: (NSString *)color{ NSString *cString = [[color stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineC ...
分类:
其他好文 时间:
2016-06-02 13:27:03
阅读次数:
126
UIColor *color = [UIColor whiteColor]; _usernameTextField.attributedPlaceholder = [[NSAttributedString alloc] initWithString:@"请输入账号" attributes:@{NSF ...
分类:
其他好文 时间:
2016-06-02 13:06:01
阅读次数:
216
原文网址:http://blog.sina.com.cn/s/blog_5f19ccb10101bhqh.html 在iOS开发中,我们使用UIColor来对我们的界面进行颜色设置,一般我们通过以下两种方法使用UIColor:1,label.textColor = [UIColor blueColo ...
分类:
其他好文 时间:
2016-06-02 00:46:21
阅读次数:
193
_interestedBtn = [UIButton buttonWithType:UIButtonTypeCustom]; _interestedBtn.layer.cornerRadius = 8; _interestedBtn.layer.borderColor = [UIColor oran ...
分类:
其他好文 时间:
2016-05-29 12:15:16
阅读次数:
118
//设置字体颜色 [self.searchTextField setValue:[UIColor colorWithRed:0.50 green:0.50 blue:0.50 alpha:1.0] forKeyPath:@"_placeholderLabel.textColor"]; //设置字体大 ...
分类:
其他好文 时间:
2016-05-27 16:37:42
阅读次数:
143
self.navigationController.navigationBar.barTintColor = [UIColor colorWithRed:255/255.0f green:102/255.0f blue:0/255.0f alpha:1]; ...
分类:
移动开发 时间:
2016-05-27 11:01:35
阅读次数:
139
self.view.backgroundColor = [UIColor orangeColor]; //加载旋转的菊花效果 //无需设置frame[UIActivityIndicatorView实现要实现的风火轮效果] UIActivityIndicatorView *indicatorView ...
分类:
移动开发 时间:
2016-05-26 21:52:09
阅读次数:
296