ACEDrawingView icon indicating copy to clipboard operation
ACEDrawingView copied to clipboard

Support zooming

Open allwarr opened this issue 10 years ago • 8 comments

What would be the best approach to adding zooming functionality? Thanks!

allwarr avatar Dec 25 '13 17:12 allwarr

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;

cepages avatar Sep 25 '14 16:09 cepages

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).

vtourraine avatar Jun 08 '15 11:06 vtourraine

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

acerbetti avatar Jun 08 '15 19:06 acerbetti

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?

vtourraine avatar Jun 12 '15 14:06 vtourraine

Hello vtourraine, I want to use zooming function, do you did it?

rollr76518 avatar Mar 30 '17 07:03 rollr76518

Can we get the sample. Thanks.

tharhtet avatar Jul 13 '17 03:07 tharhtet

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 avatar Mar 02 '18 06:03 hezhk3

@hezhk3 Any solutions found for removing that drawing before it zooms?

dimmangeorge avatar Dec 25 '18 08:12 dimmangeorge