1

I am rendering an a lines on UIView. Problem is when I zoom in view, it gets blurred. I want to maintain the clarity while its getting zoom. Can this be achievable through rendering image in background? If yes then how? I am stuck at this part.[When zoomed[1] Normal

below is code for drawing lines :

 override  func draw(_ rect: CGRect)
    {
        let shape = CAShapeLayer()
        self.layer.addSublayer(shape)
        shape.fillColor = UIColor.black.cgColor
        shape.strokeColor = UIColor.white.cgColor
        let path = CGMutablePath()
        for stroke in strokePoints
        {
            //print(stroke.startPoint,stroke.endPoint)
            path.move(to: stroke.startPoint)
            path.addLine(to: stroke.endPoint)
        }
        shape.path = path
    }
blueWings
  • 71
  • 1
  • 9

0 Answers0