title: Getting "deallocated while key value observers were still registered with it." errors after conversion to ARC
body: <p>I am using this class:</p>
  
  <p><a href="https://github.com/alexleutgoeb/ALPickerView" rel="nofollow">https://github.com/alexleutgoeb/ALPickerView</a></p>
  
  <p>Since I converted to ARC, I get this error after clicking on the pickerview a couple of times:</p>
  
  <pre><code>2011-10-18 14:10:19.424 MappingApp[3398:10d03] An instance 0x73c7cd0 of class CustomTapGestureRecognizer was deallocated while key value observers were still registered with it. Observation info was leaked, and may even become mistakenly attached to some other object. Set a breakpoint on NSKVODeallocateBreak to stop here in the debugger. Here's the current observation info: &lt;NSKeyValueObservationInfo 0x5d93430&gt; (&lt;NSKeyValueObservance 0x5d933f0: Observer: 0x5d66eb0, Key path: state, Options: &lt;New: YES, Old: NO, Prior: NO&gt; Context: 0x0, Property: 0x746b180&gt;)
  </code></pre>
  
  <p>The error points to the CustomTapGestureRecoginizer class and the last line of this method:</p>
  
  <pre><code>- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
      [super touchesBegan:touches withEvent:event];
      // Simple hack, set recognizer state to possible as tap begins
      self.state = UIGestureRecognizerStatePossible;
  }
  </code></pre>
  
  <p>In checkview, I have this method:</p>
  
  <pre><code>- (void)didMoveToSuperview {
      gestureRec = [[CustomTapGestureRecognizer alloc] initWithTarget:nil action:nil];
      gestureRec.numberOfTapsRequired = 1;
      [gestureRec addObserver:self forKeyPath:@"state" options:NSKeyValueObservingOptionNew context:nil];
      [[self superview] addGestureRecognizer:gestureRec];
  }
  </code></pre>
  
  <p>And, the removeObserver, which I know can cause this problem is in checkview's dealloc. Should I move this somewhere else? Does anyone have any other ideas what might be causing this problem? It never happened before ARC.</p>