let maskPath = UIBezierPath.init(roundedRect: box, byRoundingCorners: [.topRight,.topLeft], cornerRadii: CGSizeMake(width: 6.0, height: 6.0))
let maskLayer = CAShapeLayer()
maskLayer.frame = self.bgView.bounds
maskLayer.path = maskPath.cgPath
self.bgView.layer.mask = maskLayer
网友评论