美文网首页
镂空效果

镂空效果

作者: 风吹柳絮如花落 | 来源:发表于2021-10-20 14:32 被阅读0次

镂空效果

        let bpath = UIBezierPath.init(rect: self.bounds)
        bpath.append(UIBezierPath.init(roundedRect: CGRect.init(x: 1, y: 16, width: self.width - 2, height: self.height - 32), cornerRadius: 8).reversing())
        let layer = CAShapeLayer.init()
        layer.path = bpath.cgPath
        self.layer.mask = layer

相关文章

网友评论

      本文标题:镂空效果

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