我正在使用这堂课:
https://github.com/alexleutgoeb/ALPickerView
由于我转换为ARC,因此在点击pickerview几次后出现此错误:
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: <NSKeyValueObservationInfo 0x5d93430> (<NSKeyValueObservance 0x5d933f0: Observer: 0x5d66eb0, Key path: state, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: 0x746b180>)
Run Code Online (Sandbox Code Playgroud)
该错误指向CustomTapGestureRecoginizer类和此方法的最后一行:
- (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { …Run Code Online (Sandbox Code Playgroud) cocoa-touch dealloc ios observer-pattern automatic-ref-counting