ACEDrawingView
ACEDrawingView copied to clipboard
Support zooming
What would be the best approach to adding zooming functionality? Thanks!
Do you mean something like this?
https://itunes.apple.com/gb/app/wrapper/id772147602?mt=8
I did that just setting the userInteraction to no:
self.drawingView.userInteractionEnabled = NO;
You can put ACEDrawingView
inside a UIScrollView
, and enable zooming. The trick is to set scrollView.panGestureRecognizer.minimumNumberOfTouches = 2;
, in order to let one-finger gestures be used for drawing only.
Very straightforward, the big downside is that all strokes will suffer a slight delay (the scroll view needs time to decide if you’re actually using two finders).
That's an interesting idea.... a lot of people are requesting for zoom capabilities.
Do you mind to edit the demo app with this approach? I think a lot of people will appreciate it
Thanks
Sure, it’s really easy to do. The only thing is, like I mentioned, it does add a delay to every path you draw. It’s a small delay, but noticeable. So I think it’s best to keep the default demo app as-is, maybe add a button to switch to a zoomable mode? Or document it in the readme?
Hello vtourraine, I want to use zooming function, do you did it?
Can we get the sample. Thanks.
I put ACEDrawingView inside a UIScrollView and set scrollView.panGestureRecognizer.minimumNumberOfTouches = 2, it is able to zoom, but still draw a little before it zooms.
@hezhk3 Any solutions found for removing that drawing before it zooms?