0

I want to represent, for a presentation, the PDFKit framework of Apple as an MVC pattern, should i assume there is a PDFViewController for the PDFView, PDFDocumentController for the PDFDocument and so on, or because it's an API it's not possibile to represent it with this pattern?

The following is an image form WWDC 2017 slide about the components:

enter image description here

Also as stated here ( https://pspdfkit.com/guides/ios/current/migration-guides/migrating-from-apple-pdfkit/) the PDFView seems to be both a view and a controller, does this make any sense?

L Y E S - C H I O U K H
  • 4,765
  • 8
  • 40
  • 57
Gianni
  • 41
  • 1
  • 6

1 Answers1

0

Apple's PDFView is a view, not a view controller. It inherits from UIView. See the "Inherits From" section in the Apple API. While PSPDFKit's PSPDFViewController is a view controller. It inherits from UIViewController.

In the Migrating from Apple PDFKit article, PSPDFViewController is the corresponding UI component for Apple's PDFView in the context of PDFXKit, which a drop-in replacement for Apple PDFKit which uses PSPDFKit framework under the hood.

See our Introducing PDFXKit blog post for more details.

Rad Azzouz
  • 59
  • 5
  • Yes, it looks like that because the PDFKit it's an API, it doesn't expose the application logic. Thus they obviously used a PDFViewController, PDFDocumentController, but you can't see it from the interface of the API. – Gianni Mar 21 '18 at 11:01