Overriding setupPDFView() in PDFNavigatorViewController #350
-
Hello! I'm currently migrating from 2.0.0 to 2.6.0 and previously I have been able to subclass PDFNavigatorViewController to override the function setupPDFView(). This was to setup events to change page on left and right swipe gestures. What I'm encountering now is that when trying to subclass PDFNavigatorViewController I get either "cannot be constructed because it has no accessible initializers" or that it has to be using the designated initializer if I create a new init function. If I understand this correctly, with my limited swift knowledge, this is because of the initializer that is now private in PDFNavigatorViewController after the move to HTTPServer parameter and this is the only initializer that initializes all class variables. My question is now, is it still possible to subclass and override setupPDFView in PDFNavigatorViewController or should this be done in some other way now? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Ups, that's an oversight. I restored the ability to subclass in Let me know if |
Beta Was this translation helpful? Give feedback.
Ups, that's an oversight. I restored the ability to subclass in
develop
but also added aPDFNavigatorDelegate
API to setup the PDF view. It's recommended to use the delegate instead of subclassing now.Let me know if
develop
solves the problem for you, and then I'll do a patch release.