iOS5 Stable App Crashing in iOS4.3 Simulator

后端 未结 2 991
长发绾君心
长发绾君心 2021-01-17 18:21

i am getting an NSInvalidArgumentException with reason: -[UITapGestureRecognizer initWithCoder:]: unrecognized selector sent to instance

my understandin

相关标签:
2条回答
  • 2021-01-17 19:02

    As @mit3z states in his comment on the original question, iOS 4.3 supports this feature only when setup up manually with code. It is not supported with Interface Builder.

    Apple would have saved us all grief over this if they simply added this as a build-time warning.

    0 讨论(0)
  • 2021-01-17 19:04

    I think you have a NSCoding compliant object that is deallocated before the crash. The UITapGestureRecognizer is allocated at its address and when the disappeared object (but not its reference) tries to call initWithCoder on itself, it actually calls this method on your gestureRecognizer instead.

    Then your problem comes from that deallocated object but not from your gestureRecognizer.

    Be sure to retain all your IBOutlet properties.

    0 讨论(0)
提交回复
热议问题