星空网 > 软件开发 > 操作系统

随意设置控件每一个角的倒角

UIView *view2 = [[UIView alloc] initWithFrame:CGRectMake(120, 10, 80, 80)];view2.backgroundColor = [UIColor redColor];[self.view addSubview:view2];  UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:view2.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerBottomRight cornerRadii:CGSizeMake(10, 10)];CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];maskLayer.frame = view2.bounds;maskLayer.path = maskPath.CGPath;view2.layer.mask = maskLayer;

 

 

 

作者:Tomorrow
链接:http://www.zhihu.com/question/30198825/answer/47165885
来源:知乎




原标题:随意设置控件每一个角的倒角

关键词:

*特别声明:以上内容来自于网络收集,著作权属原作者所有,如有侵权,请联系我们: admin#shaoqun.com (#换成@)。

货车专线证:https://www.goluckyvip.com/tag/34255.html
货代fba:https://www.goluckyvip.com/tag/34256.html
货代fba头程:https://www.goluckyvip.com/tag/34257.html
货代迪拜专线:https://www.goluckyvip.com/tag/34258.html
货代发fba:https://www.goluckyvip.com/tag/34259.html
融资:https://www.goluckyvip.com/tag/3426.html
宠物梳专利查询分析:https://www.kjdsnews.com/a/1842293.html
温州旧货市场有玻璃柜卖吗?:https://www.vstour.cn/a/411246.html
相关文章
我的浏览记录
最新相关资讯
海外公司注册 | 跨境电商服务平台 | 深圳旅行社 | 东南亚物流