-(void)setViewStyle:(UIView *)view{
UIBezierPath * maskPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds
byRoundingCorners:(UIRectCornerBottomLeft|UIRectCornerBottomRight)
cornerRadii:CGSizeMake(setWidth(10), setHight(10))];
CAShapeLayer * maskLayer = [CAShapeLayer layer];
maskLayer.frame = view.bounds;
maskLayer.path = maskPath.CGPath;
view.layer.mask = maskLayer;
[view.layer setMasksToBounds:YES];
}
网友评论