实现view底部两个角的圆角效果

 

哪位高人的分享,俺借来一用:

用遮罩

UIBezierPath *maskPath=  [UIBezierPath bezierPathWithRoundedRect:self.contentView.bounds byRoundingCorners:UIRectCornerBottomLeft|UIRectCornerBottomRight cornerRadii:CGSizeMake(5, 5)];

    CAShapeLayer *maskLayer=[[CAShapeLayer allocinit];

    maskLayer.frame=self.contentView.bounds;

    maskLayer.path=maskPath.CGPath;

    self.contentView.layer.mask=maskLayer;

    self.contentView.layer.masksToBounds=YES;

self.contentView 是要实现底部角要圆角的view

原文地址:https://www.cnblogs.com/ios-wyh/p/4332744.html