只设置视图的一个或几个角为圆角

来源:互联网 发布:caffe alexnet 编辑:程序博客网 时间:2024/04/30 16:39

可以使用
CAShapeLayer *styleLayer = [CAShapeLayerlayer];

UIBezierPath *shadowPath = [UIBezierPath bezierPathWithRoundedRect:cardStyleView.bounds byRoundingCorners:(UIRectCornerTopLeft|UIRectCornerTopRight) cornerRadii:CGSizeMake(8.0, 8.0)];styleLayer.path = shadowPath.CGPath;cardStyleView.layer.mask = styleLayer;使用前需引用:头文件:QuartzCore.FrameWork

文章链接:http://www.cnblogs.com/easonoutlook/archive/2012/12/10/2811363.html

0 0
原创粉丝点击