iOS给视图设置渐变颜色
来源:互联网 发布:淘宝上的情蛊是真的吗 编辑:程序博客网 时间:2024/06/05 15:26
UIView *colorView = [[UIView alloc] init];
[colorView setFrame:CGRectMake(20, 160, self.view.frame.size.width - 40, self.view.frame.size.height - 320)];
[self.view addSubview:colorView];
//设置渐变色
CAGradientLayer *gradient = [CAGradientLayer layer];
gradient.frame = colorView.bounds;
gradient.colors = [NSArray arrayWithObjects: (id)[UIColor colorWithRed:0 green:143/255.0 blue:234/255.0 alpha:1.0].CGColor, (id)[UIColor colorWithRed:0 green:173/255.0 blue:234/255.0 alpha:1.0].CGColor, (id)[UIColor whiteColor].CGColor, nil];
[colorView.layer addSublayer:gradient];
阅读全文
0 0
- iOS给视图设置渐变颜色
- iOS设置颜色渐变
- iOS 视图颜色渐变详解
- 给状态栏设置渐变颜色
- ios 设置背景渐变颜色
- iOS: 设置背景颜色为渐变
- iOS设置导航栏渐变颜色
- iOS中为控件设置颜色渐变和透明度渐变
- python给scatter设置颜色渐变条colorbar
- android 设置颜色渐变
- 设置View渐变颜色
- ios颜色渐变
- ios 颜色渐变效果
- IOS 颜色渐变
- 颜色渐变 ios
- iOS绘制颜色渐变
- ios颜色渐变
- iOS 颜色渐变
- 读取Java文件到byte数组的三种方式(转载)
- web前段 javascript入门笔记+少部分数组知识
- 完整的大数据云计算.技术图谱
- 删除
- ViewPager的简单使用
- iOS给视图设置渐变颜色
- 关于删不删游戏的抉择
- 新起点
- hibernate框架中附带提交事务的方法getCurrentSession()
- Spring之IOC/DI(一)
- 除了正则 我们还可以用什么方法将文本按行分开读取
- 版本更新
- ifix5.8添加驱动
- js验证