1.创建UIview例子: UIView *view1 =[[UIView alloc ] initWithFrame:CGRectMake(140, 100, 100, 40)];2.view1设置背景颜色例子:view1.backgroundColor = [UIColor whiteColor];3.把视图贴在窗口上例子:[self.window addSubview:view1];4.释放例...
分类:
其他好文 时间:
2015-07-30 09:35:48
阅读次数:
118
UIColor深入研究(CGColor,CIColor)由于跟人比较喜欢研究关于图层与动画方面的技术,正打算看看别人写的好东西,就遇到了好几个问题,第一:UIClor累方法的使用就是关于UIColor的使用,记得之前开发中我们使用的都是UIColor后面直接食用类方法获取颜色活着使用+ (UICol...
分类:
移动开发 时间:
2015-07-30 00:19:40
阅读次数:
3498
UILabel设置@property(nonatomic,copy)NSString *text;//显示文字@property(nonatomic,retain)UIFont *font;//字体@property(nonatomic,retain)UIColor *textColor;//文字颜...
分类:
移动开发 时间:
2015-07-29 22:42:46
阅读次数:
128
第一步://在info.plist中添加一个字段:view controller -base status bar 设置为NO;//导航颜色[[UINavigationBar appearance] setBarTintColor:[UIColor XXXX]];[[UITableViewCell ...
分类:
移动开发 时间:
2015-07-28 14:32:14
阅读次数:
181
+ (UIColor *)colorWithHex:(NSString *)string{ NSString *cleanString = [string stringByReplacingOccurrencesOfString:@"#" withString:@""]; if([cleanSt.....
分类:
移动开发 时间:
2015-07-26 05:56:42
阅读次数:
138
//设置按钮字体颜色 [self.determineBtn setTitleColor:[UIColor colorWithHexString:@"0xff9500"] forState:UIControlStateNormal]; [self.clearBtn setTitleColor:[U.....
分类:
其他好文 时间:
2015-07-24 20:31:22
阅读次数:
88
self.myView=[[UIView alloc]initWithFrame:CGRectMake(50, 50, 200, 200)]; self.myView.backgroundColor=[UIColor redColor]; [self.view addSubview:self.myV...
分类:
其他好文 时间:
2015-07-24 12:36:33
阅读次数:
117
//一键换肤 [[UINavigationBar appearance]setBarTintColor:[UIColor redColor]];//给所有的NavigationBar换颜色 [[UITabBar appearance]setBarTintColor:[UIColor blueCo.....
分类:
移动开发 时间:
2015-07-24 12:24:03
阅读次数:
156
//分页控制器UIPageControl self.page=[[UIPageControl alloc]initWithFrame:CGRectMake(50, 100, 200, 50)]; self.page.backgroundColor=[UIColor grayColor]; self....
分类:
其他好文 时间:
2015-07-24 12:02:55
阅读次数:
110
self.slider=[[UISlider alloc]initWithFrame:CGRectMake(50, 100, 200, 50)];//self.slider.tintColor=[UIColor blueColor];//已经使用进度条颜色 //数值减小(球左边)颜色 self......
分类:
移动开发 时间:
2015-07-24 11:57:41
阅读次数:
224