IOS view的圆角和阴影并存
来源:互联网 发布:医用统计软件 编辑:程序博客网 时间:2024/06/08 08:46
UIView *v=[[UIView alloc]initWithFrame:CGRectMake(10, 10, 100, 100)];
v.backgroundColor=[UIColor yellowColor];
//v.layer.masksToBounds=YES;这行去掉
v.layer.cornerRadius=10;
v.layer.shadowColor=[UIColor redColor].CGColor;
v.layer.shadowOffset=CGSizeMake(10, 10);
v.layer.shadowOpacity=0.5;
v.layer.shadowRadius=5;
v.backgroundColor=[UIColor yellowColor];
//v.layer.masksToBounds=YES;这行去掉
v.layer.cornerRadius=10;
v.layer.shadowColor=[UIColor redColor].CGColor;
v.layer.shadowOffset=CGSizeMake(10, 10);
v.layer.shadowOpacity=0.5;
v.layer.shadowRadius=5;
[self.view addSubview:v];
效果如下
/* When true an implicit mask matching the layer bounds is applied to
* the layer (including the effects of the `cornerRadius' property). If
* both `mask' and `masksToBounds' are non-nil the two masks are
* multiplied to get the actual mask values. Defaults to NO.
* Animatable. */
0 0
- IOS view的圆角和阴影并存
- iOS view的圆角和阴影并存
- IOS view的圆角和阴影并存
- IOS view的圆角和阴影并存
- iOS圆角和阴影并存
- iOS view边框和阴影的设置圆角
- IOS中View添加阴影/圆角的方法
- ios 直角和圆角 并存
- Android View的圆角和阴影(border and shadow)
- Android View的圆角和阴影(border and shadow)
- 设置view的圆角、边框、阴影
- iOS 开发--设置View的边框阴影
- Ios 圆角和阴影实现
- iOS-设置阴影和圆角效果
- 如何给一个View同时设置圆角和阴影
- View的OnTouch和OnClick事件不能并存问题
- IOS 中view 添加阴影
- IOS View 添加阴影效果
- 通过className获取元素的js
- 【转】使用文本文件(.txt)进行数据存取的技巧总结(相当的经典)
- 堆和栈的区别
- 系统级性能分析工具 — Perf
- 10分钟学会理解和解决MySQL乱码问题
- IOS view的圆角和阴影并存
- 我们不生产博客,我们只是技术的搬运工
- Jquery easyui datagrid在IE 9浏览器下,删除数据后,页面刷新数据仍显示的问题。
- Android.mk文件语法规范及使用模板
- git 使用
- SDN和SDS如何影响未来的云构架
- 基础总结篇之五:BroadcastReceiver应用详解
- OpenGL显示列表
- Android事件小结