Alua-Kinzhebayeva / iOS-PDF-Reader

PDF Reader for iOS written in Swift
MIT License
533 stars 150 forks source link

Easy Initialization #22

Closed jwelton closed 7 years ago

jwelton commented 7 years ago

Easy Initialization

Creating an instance of the PDFViewController I thought was a little overly complex, as it required loading from a separate storyboard. This pull request introduces a class level function for PDFViewController, that takes a document and returns a ready to use PDFViewController.

In addition to this, I've also dropped the deployment target from 9.0 to 8.0, as I cannot see any iOS 9.0 only code anywhere?

ranunez commented 7 years ago

This looks like a very nice improvement! However, shouldn't createNew be public instead of internal? Also can you update the example demo project as well to use this new initialization syntax? Thanks!

jwelton commented 7 years ago

Ah my mistake! I've made the function public now. I've also updated the example project too 😸

ranunez commented 7 years ago

Thanks again @jwelton!!