Open finddoc opened 9 years ago
Please, check if this is an issue on sammcewan's fork (which is actively maintained), and report it there if it is. Thanks.
It occur for me too. The reason is observer adding double called after animation done but the observer removing call only once when controller do dismiss.
How to fix the bug?
I just turn off animation, popover works well in this repo.
*\ Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'An instance 0x7fb51bf83970 of class DoctorLocationAddrPopoveredViewController was deallocated while key value observers were still registered with it. Current observation info: <NSKeyValueObservationInfo 0x7fb51b9d86c0> ( <NSKeyValueObservance 0x7fb51b9d7760: Observer: 0x7fb51e5bcc30, Key path: preferredContentSize, Options: <New: NO, Old: NO, Prior: NO> Context: 0x0, Property: 0x7fb51e9b0130> )'
Generated when: Calling in dispatch_async OR preformSelectorInMainThread
Generated by:
[viewController removeObserver:self forKeyPath:NSStringFromSelector(@selector(preferredContentSize))]; and ... [strongSelf->viewController addObserver:self forKeyPath:NSStringFromSelector(@selector(preferredContentSize)) options:0 context:nil];
Generated in: iOS 8 both sim and actual device.