简体   繁体   中英

How to correctly subclass UIGestureRecognizer

I have gone through the documentation: https://web.archive.org/web/20130309051214/http://developer.apple.com/library/ios/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/GestureRecognizer_basics/GestureRecognizer_basics.html#//apple_ref/doc/uid/TP40009541-CH2-SW2

I am trying to implement the check mark example shown in the documentation and I can't because the compiler shows a bunch of warnings about the [super touchesMoved:touches withEvent:event] call, which is recommended by the documentation.

Where's the full example to learn how to correctly subclass for implementing a custom gesture?

I found the following WWDC 2010 Session Videos extremely useful:

  • Session 120 - Simplifying Touch Event Handling with Gesture Recognizers ( pdf )
  • Session 121 - Advanced Gesture Recognition ( pdf )

To access these videos you must login at https://developer.apple.com .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM