圆角虚线
2021-09-13 本文已影响0人
woo_5857
圆角虚线
let borderLayer = CAShapeLayer()
borderLayer.strokeColor = UIColor.red.cgColor
borderLayer.lineDashPattern = [3,3]
borderLayer.backgroundColor = UIColor.clear.cgColor
borderLayer.fillColor = UIColor.clear.cgColor
bgView.layer.addSublayer(borderLayer)
borderLayer.path = UIBezierPath(roundedRect: bgView.bounds, cornerRadius: 8).cgPath