i am trying to draw text in center of white circle and the text color should be transparent so it represent color of background view. hence as the color of background view(i.e gradient color) changes the color of text also changes.
Below is code that is used to draw white circle
let circleLayer = CAShapeLayer();
circleLayer.path = UIBezierPath(ovalIn: CGRect(x: self.view.frame.width/2 - 87, y: self.view.frame.height/2 - 87, width: 174, height: 174)).cgPath;
circleLayer.strokeColor = UIColor.clear.cgColor;
circleLayer.fillColor = UIColor.white.cgColor;
self.view.layer.addSublayer(circleLayer)
Now i need to add text to this white circle which is transparent, as in which represent the color of background view
OR overall simply we can say that, i need to cut out the white circle in form of text so the background view color can be seen from that cutted part
Any help would be great..!
Thank You.