I draw bezierpaths in a zoomable UIView (drawing layer of a pdf reader). When I zoom in the document the UIView zoom in too, but then all the drawings and lines looks much more pixelated. Is there a way to render those paths without too much pixelation? It supposed that bezier paths are vectorial based...
Thanks in advance!
You are correct that a UIBezierPath is vector based. However, when you draw a path into a view, it uses the contentScale
property on the views layer to determine the amount of detail to use when drawing.
What you could do is when the user finishes zooming, set the content scale to the correct amount.
drawingView.layer.contentScale = [[UIScreen mainScreen] scale] * zoomAmount;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With