如何删除UIView底部边框?

时间:2017-05-11 05:23:24

标签: ios uiview uibezierpath cashapelayer

UIBezierPath *maskDefault = [UIBezierPath bezierPath];
[maskDefault moveToPoint:CGPointMake(0.0, 0.0)];
[maskDefault addLineToPoint:CGPointMake(width, 0.0)];
[maskDefault addLineToPoint:CGPointMake(width, height * 0.8)];
[maskDefault addLineToPoint:CGPointMake(width * 0.8, height)];
[maskDefault addLineToPoint:CGPointMake(width * 0.2, height)];
[maskDefault addLineToPoint:CGPointMake(0.0, height * 0.8)];
[maskDefault closePath];

CAShapeLayer *maskingDefulatLayer = [CAShapeLayer layer];
maskingDefulatLayer.path = maskDefault.CGPath;

CAShapeLayer *maskingLayer = [CAShapeLayer layer];
maskingLayer.path = maskDefault.CGPath;

self.uiView.layer.mask = maskingDefulatLayer;

我想删除底部边框,就像第二张图片一样。

帮帮我

enter image description here

enter image description here

0 个答案:

没有答案