UIBezierPath *maskPath = [UIBezierPath bezierPathWithRoundedRect:self.hotBg.bounds byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerTopRight cornerRadii:CGSizeMake(6, 6)];
CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
maskLayer.frame=self.hotBg.bounds;
maskLayer.path= maskPath.CGPath;
self.hotBg.layer.mask= maskLayer;
网友评论