iOS 设置
特定几个角设置圆角
let maskPath = UIBezierPath.init(roundedRect: self.bounds, byRoundingCorners: UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue), cornerRadii: CGSize.init(width: 50
, height:50))
let maskLayer = CAShapeLayer.init()
maskLayer.frame = self.bounds
maskLayer.path = maskPath.cgPath
self.layer.mask = maskLayer
backView.layer.backgroundColor = UIColor.clear.cgColor
网友评论