You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm getting "unrecognized selector" crashes in PSPDFTextView.
-[PSPDFTextView scrollViewDidScroll:]: unrecognized selector sent to instance 0x1641f200
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.
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?
The text was updated successfully, but these errors were encountered: