0

I have a CustomView, inside which I have added my custom CALayer ([self.layer addSublayer:...]) which I subclassed to do some custom drawing in drawInContext method of my layer. I draw there simple paths.

The CustomView is added as subview to UIScrollView.

The problem is when I zoom, the content doesn't get redrawn so the path looks blurry.

How to fix that? I tired to call setNeedsDisplay on the layer and sublayer when zoom ends, but without results.

Example of blurry path and correct one after zooming:

enter image description here

Piotr Wach
  • 913
  • 2
  • 9
  • 22
  • 1
    Might be related to this post: http://stackoverflow.com/questions/5538394/vector-like-drawing-for-zoomable-uiscrollview/ – pe8ter Dec 15 '11 at 10:28
  • Yes, it works, but is it possible to do this without increasing memory consumption? CAShapeLayer somehow does it. – Piotr Wach Dec 16 '11 at 10:24
  • Doubtful. Drawing at higher resolutions requires more memory. – pe8ter Dec 16 '11 at 18:41

0 Answers0