Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Do not load thumbnails strip at controller creation #38

Merged
merged 4 commits into from
Feb 23, 2017

Conversation

stuffmc
Copy link
Contributor

@stuffmc stuffmc commented Feb 14, 2017

Some apps (like ours) don't want to display the thumbnails. In our case, most documents are 1 to 2 pages, so it doesn't make sense. Also, this way it doesn't have to load an additional controller.

@stuffmc stuffmc force-pushed the feature/disable_thumbnails branch from 7bf8f64 to 8f8ec07 Compare February 17, 2017 21:16
@stuffmc stuffmc changed the title Ability to not load the thumbnails strip when the controller is created Do not load the thumbnails strip when the controller is created Feb 17, 2017
@stuffmc stuffmc changed the title Do not load the thumbnails strip when the controller is created Do not load thumbnails strip when the controller is created Feb 17, 2017
@stuffmc stuffmc changed the title Do not load thumbnails strip when the controller is created Do not load thumbnails strip at controller creation Feb 17, 2017
@@ -55,6 +55,8 @@ internal final class StartViewController: UIViewController {
/// Presents a document
///
/// - parameter document: document to present
///
/// Add `thumbnailsEnabled:false` to `createNew` to not load the thumbnails in the controller.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please update the README with this new flag instead of this comment

@@ -17,7 +17,7 @@ extension PDFViewController {
/// - parameter backButton: button to override the default controller back button
///
/// - returns: a `PDFViewController`
public class func createNew(with document: PDFDocument, title: String? = nil, actionButtonImage: UIImage? = nil, actionStyle: ActionStyle = .print, backButton: UIBarButtonItem? = nil) -> PDFViewController {
public class func createNew(with document: PDFDocument, title: String? = nil, actionButtonImage: UIImage? = nil, actionStyle: ActionStyle = .print, backButton: UIBarButtonItem? = nil, thumbnailsEnabled: Bool? = true) -> PDFViewController {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is thumbnailsEnabled here optional? If its not optional, we wouldn't need to force unwrap it below (it should still have a default value)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please update the documentation with this new parameter

}

/// Slides horizontally (from left to right, default) or vertically (from top to bottom)
public var scrollDirection: UICollectionViewScrollDirection = .horizontal {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is supposed to be in #40 instead

@ranunez ranunez merged commit a4fa955 into Alua-Kinzhebayeva:master Feb 23, 2017
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants