Wednesday, 8 April 2015

set cornerRadius for only bottom-left,bottom-right and top-left corner of a view/cell


UIBezierPath *maskPath;
    maskPath = [UIBezierPath bezierPathWithRoundedRect:view.bounds byRoundingCorners:(UIRectCornerBottomLeft | UIRectCornerBottomRight) cornerRadii:CGSizeMake(20.0, 20.0)];
    CAShapeLayer *maskLayer = [[CAShapeLayer alloc] init];
    maskLayer.path = maskPath.CGPath;
    view.layer.mask = maskLayer;
(0r)
 cell.layer.mask = maskLayer;

No comments:

Post a Comment