CGContextRef context = UIGraphicsGetCurrentContext(); //设置上下文 //画一条线 CGContextSetStrokeColorWithColor(context, [UIColor redColor].CGColor);//线条...
分类:
移动开发 时间:
2015-10-10 12:22:43
阅读次数:
326
1.Objectice-C code: 1 NSShadow *shadow = [NSShadow new]; 2 3 [shadow setShadowColor:[UIColor colorWithRed:1.0 green:1.0 blue:1.0 alpha:1.0]]; 4 5 [s.....
分类:
编程语言 时间:
2015-10-07 12:09:40
阅读次数:
355
View//取得layer CALayer *layer = self.purpleView.layer; // 绘制边框宽度 layer.borderWidth = 50; // 绘制边框颜色 layer.borderColor = [UIColor greenColo...
分类:
其他好文 时间:
2015-10-02 17:28:16
阅读次数:
112
UILabel?*titleText?=?[[UILabel?alloc]?initWithFrame:?CGRectMake(kWidth/2?-60,?0,?120,?50)];
titleText.backgroundColor?=?[UIColor?clearColor];
titleText.textAlignment?=?NSTextAlignme...
分类:
移动开发 时间:
2015-09-29 20:43:50
阅读次数:
156
1.普通设置 self.window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen]bounds]]; self.window.backgroundColor = [UIColor orangeColor]; ViewControl...
分类:
其他好文 时间:
2015-09-28 18:53:13
阅读次数:
163
1.创建类继承UIImage;2.创建绘制虚线的方法实现:+ (id)imageWithSize:(CGSize)size borderColor:(UIColor *)color borderWidth:(CGFloat)borderWidth{ //开启图片上下文 UIGraphicsBegin...
分类:
其他好文 时间:
2015-09-28 18:42:36
阅读次数:
153
一.阴影(NSShadow)参考self.view.layer.shadowColor = [UIColor blackColor].CGColor; //阴影颜色self.view.layer.shadowOffset = CGSizeMake(10, 10); //阴影偏移 四周阴影则设置为.....
分类:
其他好文 时间:
2015-09-28 14:33:33
阅读次数:
173
//tabbar选中时的颜色 tabBarController.tabBar.tintColor=[UIColor whiteColor] ; //右上角数字 //可以添加个lable来改变原点的大小, //使用通知/kvo来改变上面的数字 item1.badgeValue=@" “; //...
分类:
移动开发 时间:
2015-09-26 11:45:23
阅读次数:
1088
一: 创建: UITextField *tf = [[UITextField alloc]initWithFrame:CGRectMake(50, 50, 200, 50)];二: UITextField的一些属性 (1) 颜色:tf.backgroundColor = [UIColor yello...
分类:
其他好文 时间:
2015-09-26 00:32:17
阅读次数:
186
iOS UIColor *topColor = [UIColor redColor]; UIColor *bottomColor = [UIColor yellowColor]; NSArray *gradientColors = [NSArray arrayWithObj...
分类:
其他好文 时间:
2015-09-25 18:16:14
阅读次数:
219