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 :)
精彩评论