0

Possible Duplicate:
iOS5 Stable App Crashing in iOS4.3 Simulator

I have a UIViewController with a xib with a View and a UISwipeGestureRecognizer. When I run in an iOS 6 simulator everything works as intended.

When I run in an iOS 4.3 simulator and attempt to access the viewController.view which causes the xib to be loaded for the first time, then I get this error message:

-[UISwipeGestureRecognizer initWithCoder:]: unrecognized selector sent to instance 0x7385340

Switch back to iOS6, loads no problem. iOS 4.3, crash.

This is my IBOutlet definition for the gesture recognizer I'm creating in that xib:

@property (strong, nonatomic) IBOutlet UISwipeGestureRecognizer *gestureRecognizerSwipeClosed;

enter image description here

Community
  • 1
  • 1
Kenny Wyland
  • 20,844
  • 26
  • 117
  • 229

1 Answers1

2

This was already answered: here.
I don't know the exact version when UIGestureRecognizers were added to Interface Builder. But it seems that it is not supported in iOS 4.3.
Any object loaded from a nib is initialized with initWithCoder:. So in iOS 4.3 there is no such method to initialize the gesture. What you can do though is create the gestures programmatically, this will work in iOS 4.3.

Community
  • 1
  • 1
grandouassou
  • 2,500
  • 3
  • 25
  • 60
  • /facepalm Thanks! I had checked to make sure the code was available in 4.3, I never thought this might be an issue. – Kenny Wyland Sep 29 '12 at 19:21