设置View类部分圆角

2016-12-17  本文已影响8人  阴中阳
// 设置一个View类型的半边圆角A

 let path = UIBezierPath(roundedRect: Setting.bounds, byRoundingCorners: [UIRectCorner.topRight, UIRectCorner.bottomRight], cornerRadii: CGSize(width: 5, height: 5))
        let shapeLayer = CAShapeLayer()
        shapeLayer.path = path.cgPath
        Setting.layer.mask = shapeLayer
上一篇下一篇

猜你喜欢

热点阅读