设置圆角。边框 和 阴影
2015-06-03 16:25
281 查看
//设置圆角 self.appImgView.layer.masksToBounds = YES; self.appImgView.layer.cornerRadius = 5; //设置边框 self.appImgView.layer.borderColor = [[UIColor redColor] CGColor]; self.appImgView.layer.borderWidth = 1.0f; //设置阴影 self.BgAPPImageView.layer.shadowColor = [UIColor blackColor].CGColor;//阴影颜色 self.BgAPPImageView.layer.shadowOffset = CGSizeMake(2, 2);//偏移距离 self.BgAPPImageView.layer.shadowOpacity = 1;//不透明度 self.BgAPPImageView.layer.shadowRadius = 2.0;//半径
但是设置了圆角就不能设置阴影 因为 设置阴影的话
masksToBounds 就不能为YES 只能再写个底图
相关文章推荐
- jquery ui datepicker中文显示
- PHP收邮件receiveMail
- CommonJS的模块规范
- Excel的xml表现格式
- 简单的分页封装(一)
- SharePoint 2010 中创建超链接到Pop-Up对话框
- 数据库引擎
- GeoGlobe Server使用问题收集
- 安装sql server 2008 R2数据库
- eclipse下的tomcat内存设置大小
- Windows下使用Bcp命令
- Android-自定义AttributeSet属性
- delete []p|wstring obj(L"sfdf\0ds",len)
- 关于Android软键盘弹出,会把原来的界面挤上去的问题
- 《Java编程思想》学习笔记15——对象序列化
- 《Java编程思想》学习笔记16——枚举
- TranslateAnimation类详解
- AtomicReference与volatile
- jquery 拖拽介绍
- C#设计模式(1)——单例模式