开发者

touchesMoved QuartzDemo application

开发者 https://www.devze.com 2022-12-31 22:52 出处:网络
I am modifying the QuartzDemo application to include swipe detection while UIView is active (a PDF page being displayed in it via Quartz).

I am modifying the QuartzDemo application to include swipe detection while UIView is active (a PDF page being displayed in it via Quartz).

This wil开发者_StackOverflowl not work, the event never gets to the QuartzView.m because it sits under scrollview?

touchesBegan: works fine and I can use single tap.

How can I go about with catching touchesMoved while PDF page is being displayed?

I need a simple example with code that does nothing on touchesMoved:, I'll build up on that later.

Please keep in mind that I still want to use the UIScrollview as it is and show PDF content based on selection in that scrollview.


I solved this by implementing touchesBegan, touchesMoved and touchesEnded in QuartzView.m.

I also added this in QuartzViewController.m:

scrollView.maximumZoomScale = 1.0;
scrollView.minimumZoomScale = 1.0;
scrollView.scrollEnabled = NO;
scrollView.pagingEnabled = NO;   

Works like I wanted it to :)

0

精彩评论

暂无评论...
验证码 换一张
取 消