iOS view的指定角设置圆弧
来源:互联网 发布:工信部网站域名查询 编辑:程序博客网 时间:2024/05/01 06:53
UIView *view2 = [[UIViewalloc]initWithFrame:CGRectMake(120,10,80, 80)];
view2.backgroundColor = [UIColorredColor];
[self.viewaddSubview:view2];
UIBezierPath *maskPath = [UIBezierPathbezierPathWithRoundedRect:view2.boundsbyRoundingCorners:UIRectCornerBottomLeft |UIRectCornerBottomRight cornerRadii:CGSizeMake(10,10)];
CAShapeLayer *maskLayer = [[CAShapeLayeralloc]init];
maskLayer.frame = view2.bounds;
maskLayer.path = maskPath.CGPath;
view2.layer.mask = maskLayer;
// 其中,byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight
// 指定了需要成为圆角的角。该参数是UIRectCorner类型的,可选的值有:
UIRectCornerTopLeft
UIRectCornerTopRight
UIRectCornerBottomLeft
UIRectCornerBottomRight
UIRectCornerAllCorners
- iOS view的指定角设置圆弧
- view的指定角设置圆弧
- IOS 设置支付按键方形角为圆弧
- 为指定的View设置透明度效果
- Android自定义View之圆弧形进度条,支持背景图片设置
- IOS设置View的背景图片
- IOS设置View的背景图片
- IOS设置View的背景图片
- IOS设置View的背景图片
- IOS设置View的背景图片
- iOS 设置view的边框
- iOS View 指定圆角位置
- iOS 如何让view指定圆角
- ios view 设置圆角
- iOS中Quartz2D的画圆弧问题
- iOS给控件的指定位置设置圆角
- ios中设置view的圆角角度
- iOS view边框和阴影的设置圆角
- Python 读入windows 的记事本内容 编码 类别(ANSI,utf-8,Unicode)
- 【PAT】1034. Head of a Gang (30)
- Java并发与线程相关资源汇总
- Oracle取余函数mod
- 深入理解javascript的原型与闭包
- iOS view的指定角设置圆弧
- 如何解决Android 5.0中出现的警告:Service Intent must be explicit
- OGRE SampleBrowser框架解析
- checkbox框的各种状态选择
- android弹出窗口实现
- Python 私有属性与内部方法
- iOS 常用:点击屏幕和return退出隐藏键盘和解决虚拟键盘挡住UITextField的方法
- Window下让JAR在后台运行的方法
- msql小技巧