问题
Is it possible to recognize gestures and touches simultaneously when interacting with a UIKit object. For example, when a user is scrolling through a slider or pickerview, could I also be handling a swipe gesture?
回答1:
If you set your view controller to be the delegate of your gestures, you can implement:
- (BOOL) gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldRecognizeSimultaneouslyWithGestureRecognizer:(UIGestureRecognizer *)otherGestureRecognizer
I'm not sure if you're also trying to have the view handle touch events separately, but if you are, I'd recommend subclassing UIGestureRecognizer and handle touch events there.
回答2:
Use NSThread or NSTimer to create a new thread where you can create another process which will run parallel to main thread of the application
来源:https://stackoverflow.com/questions/8855145/ios-recognizing-gestures-simultaneously-with-object-handling