iOS5 Stable App Crashing in iOS4.3 Simulator

后端 未结 2 1011
长发绾君心
长发绾君心 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: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.

提交回复
热议问题