Open hpique opened 10 years ago
It's not PSPDFTextView issue, it's Cocoa Touch bug (if we can call it this way).
I believe checking [delegate respondsToSelector:@selector(scrollViewDidScroll:)]
every time UIScrollView scrolls affects performance. I've got same issue with UITableView. My fix:
- (void)dealloc {
_tableView.delegate = nil;
}
So for you this fix will be set PSPDFTextView's delegate to nil in your UIViewController dealloc method.
I'm getting "unrecognized selector" crashes in PSPDFTextView.
These started after implementing
scrollViewDidScroll:
in the PSPDFTextView/UITextView (real) delegate, a UIViewController. To reproduce, dealloc the UIViewController while still scrolling.The stack trace:
Looks like it might be a delegate forwarding issue, but after looking at the code I'm not exactly sure what might be causing it.
If I add the following to PSPDFTextView the crashes disappear.
However, this is a patch that hides the real issue. Any idea of what it might be?