Skip to content

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
///
/// - 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

///
/// - 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants