-2
我不得不只圆整UIView
的上角。我试图使用以下代码:UIView圆角
UIBezierPath *maskEmailPath = [UIBezierPath bezierPathWithRoundedRect:self.emailandAccessView.bounds byRoundingCorners:UIRectCornerBottomLeft cornerRadii:CGSizeMake(10.0, 10.0)];
CAShapeLayer *maskEmailLayer = [CAShapeLayer layer];
maskEmailLayer.frame = self.myview.bounds;
maskEmailLayer.path = maskEmailPath.CGPath;
self.myview.layer.mask = maskEmailLayer;
但它隐藏了该视图中的所有内容。谁能帮帮我吗。
尽量不设置掩模层的帧成为你视图的边界的 – wattson12
可能重复的[制作的UIView轮的特定角(http://stackoverflow.com/questions/14067897/make-specific -corners-的-UIView的圆) –