UIView添加圆角阴影
2014-10-14 22:06
330 查看
UIView *upView =[[UIView
alloc]initWithFrame:CGRectMake(15,
self.view.frame.size.height-60,
self.view.frame.size.width-30,
44)];
[upView
setBackgroundColor:[UIColor
whiteColor]];//设置背景色
[[upView layer] setShadowOffset:CGSizeMake(1,
1)];
upView.layer.cornerRadius=3;//设置圆角
[[upView
layer] setShadowRadius:5];//设置圆角阴影
[[upView
layer] setShadowOpacity:1];
[[upView
layer] setShadowColor:[UIColor
blackColor].CGColor];//设置阴影颜色
alloc]initWithFrame:CGRectMake(15,
self.view.frame.size.height-60,
self.view.frame.size.width-30,
44)];
[upView
setBackgroundColor:[UIColor
whiteColor]];//设置背景色
[[upView layer] setShadowOffset:CGSizeMake(1,
1)];
upView.layer.cornerRadius=3;//设置圆角
[[upView
layer] setShadowRadius:5];//设置圆角阴影
[[upView
layer] setShadowOpacity:1];
[[upView
layer] setShadowColor:[UIColor
blackColor].CGColor];//设置阴影颜色
相关文章推荐
- 给uiview添加阴影或添加圆角
- 给UIview添加阴影效果
- UIView周边加阴影,并且同时圆角
- 在xib上给UIView添加边框或圆角
- [ios]给UIView 加圆角,加阴影
- Xcode9学习笔记7 - UIView视图添加圆角效果
- 1.给图像添加阴影、边框和圆角 2。CALayer的隐式动画
- IOS UIView圆角,阴影,边框,渐增光泽
- iphone-- UIView 加入边框,阴影,圆角
- Xcode9学习笔记8 - UIView视图添加阴影效果
- iOS如何为圆角添加阴影效果示例代码
- UIview阴影与圆角混合使用
- iOS UIView 及其子类添加阴影(shadowColor,shadowOffset,shadowOpacity)
- UIView阴影和圆角的关系
- UImageView UIview添加阴影
- 如何为圆角添加阴影
- 将视图设置成圆角和阴影添加以及UIButton定义和设置圆角
- UIView,UIButton,UIImageView等设置圆角,设置阴影,设置边框的方法
- 为圆角矩形卡片底部添加阴影效果
- UIVIEW 设置圆角 +边框阴影