UIBezierPath *maskOnePath = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, SCREEN_WIDTH, 1000) byRoundingCorners:UIRectCornerTopLeft | UIRectCornerBottomLeft cornerRadii:CGSizeMake(18, 18)];
CAShapeLayer *maskOneLayer = [[CAShapeLayer alloc] init];
maskOneLayer.frame = oneBtn.bounds;
maskOneLayer.path = maskOnePath.CGPath;
oneBtn.layer.mask = maskOneLayer;
网友评论