UIKit UISwipeGestureRecognizer in Xcode application called when nib loads?

I added a UISwipeGestureRecognizer to my Xcode nib, and its presence causes my application to crash:

.. exception 'NSInvalidArgumentException', reason: '- [UISwipeGestureRecognizer initWithCoder:]: an unrecognized selector is sent to instance 0x5c2ab30'.

Why?

+8
ios cocoa-touch uikit uiswipegesturerecognizer
source share
1 answer

This is because you are using the application in the wrong version of iOS. You cannot put gesture recognizers in an xib file on iOS <5, so you have to create them in code if you want to support older versions of iOS.

+21
source share

All Articles