美文网首页
iOS用贝塞尔曲线设置任意圆角

iOS用贝塞尔曲线设置任意圆角

作者: 孟小于max | 来源:发表于2019-04-03 11:00 被阅读0次
let path = UIBezierPath.init(roundedRect: CGRect(x: 0, y: 0, width: 303, height: 118), byRoundingCorners: UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue), cornerRadii: CGSize(width: 6, height: 6))
let lay = CAShapeLayer.init()
lay.path = path.cgPath
self.carStoreBG.layer.mask  = lay

相关文章

网友评论

      本文标题:iOS用贝塞尔曲线设置任意圆角

      本文链接:https://www.haomeiwen.com/subject/cwsabqtx.html