UIView 的部分圆角的设定

// 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;

你可能感兴趣的:(UIView 的部分圆角的设定)