UIView 的部分圆角的设定

2019-02-26  本文已影响4人  靠北的北
// UIView 的部分圆角的设定
UIBezierPath*maskPath = [UIBezierPath bezierPathWithRoundedRect:self.tipInfoSubView.bounds byRoundingCorners:(UIRectCornerTopRight | UIRectCornerTopLeft) cornerRadii:CGSizeMake(4,4)];//圆角大小
        CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
        maskLayer.frame = self.tipInfoSubView.bounds;
        maskLayer.path = maskPath.CGPath;
        self.tipInfoSubView.layer.mask = maskLayer;
上一篇 下一篇

猜你喜欢

热点阅读