UIView* view = [_pageController getPageView:page];
ASSERT([view isKindOfClass:[PdfDocScrollView class]]);
return (ScrollView *)view; // The line I'm talking about. Questions welcome.
If I just run a build on a simulator it works fine, though it still stops at that line of code. The profiler crashes every time at that line. I don’t know where to start looking 😐
“Stopping” means that it’s crashed.
ASSERT()will kill your app if[view isKindOfClass:[PdfScrollView class]]does not return true. Are you certain that the view is of typePdfDocScrollView? You’re doing some messy stuff with casting types onto the same object. Stick with typeiduntil you know for sure what kind of object it is, unless you absolutely need it as aUIViewfirst.Try removing the
ASSERT()line and check if it’s still crashing.