skip to Main Content

How do I mask and erase a CAShapeLayer? – Ios swift

I am trying to get erase functionality working with CAShapeLayer. Current code: class MaskTestVC: UIViewController { override func viewDidLoad() { super.viewDidLoad() view.backgroundColor = .white let image = UIImage(named: "test.jpg")! let testLayer = CAShapeLayer() testLayer.contents = image.cgImage testLayer.frame = view.bounds let…

VIEW QUESTION
Back To Top
Search