view 添加边框和阴影效果
2015-07-26 00:06
309 查看
imageView 就是需要添加 边框和 阴影的试图 //添加边框 CALayer * layer = [imageView layer]; layer.borderColor = [[UIColor redColor] CGColor]; layer.borderWidth = 5.0f; //添加四个边阴影 imageView.layer.shadowColor = [UIColor greenColor].CGColor;//阴影颜色 imageView.layer.shadowOffset = CGSizeMake(0, 0);//偏移距离 imageView.layer.shadowOpacity = 0.5;//不透明度 imageView.layer.shadowRadius = 10.0;//半径 // //添加两个边阴影 // imageView.layer.shadowColor = [UIColor blueColor].CGColor;//阴影颜色 // imageView.layer.shadowOffset = CGSizeMake(4, 4);//偏移距离 // imageView.layer.shadowOpacity = 0.5;//不透明度 // imageView.layer.shadowRadius = 2.0;//半径 [self.view addSubview:imageView];
相关文章推荐
- DOS基础命令集合
- Redis的持久化机制
- 关于路由器上网设置
- MyEclipse使用Git代码托管服务——02.用ssh连接Git服务
- CSS3 box-sizing属性
- win8 C 盘 突然少了 十几G 空间 原因,解决方法
- 自动生成 JsonFormat! 文档都在scaladoc里。
- BZOJ 2005: [Noi2010]能量采集( 数论 + 容斥原理 )
- 【BestCoder 1st Anniversary】
- redis(一)-概念
- Kafka:分布式消息系统
- java.lang.ClassNotFoundException: org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTPIm
- C语言中对文件的操作
- Python实现截屏的函数
- FastCGI 进程意外退出造成500错误
- PHP实现简单数字分页效果
- PHP中COOKIES使用示例
- php检测文本的编码
- php实现将Session写入数据库
- PHP位运算