IOS view的圆角和阴影并存
来源:互联网 发布:ubuntu和windows区别 编辑:程序博客网 时间:2024/06/05 19:12
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 添加阴影效果
- LeetCode OJ 之 Partition List (划分链表)
- ORA-01036: illegal variable name/number
- 读写锁
- MFC中UpdateData()函数的作用
- Thread和runnable区别简介
- IOS view的圆角和阴影并存
- if,else if,else的执行
- 以json格式的解析FTP上的文件,10秒超时
- Android MediaPlayer播放prepareAsync called in state 8解决办法
- Linux环境安装google v8
- 网上一些关于renderMonkey的教程:
- android初学之四大组件
- Android—在Activity中绑定service播放音乐
- url