-
Notifications
You must be signed in to change notification settings - Fork 150
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
Do not load thumbnails strip at controller creation #38
Conversation
We can just check if the `UINavigationBar` is hidden or not.
# Conflicts: # Sources/Classes/PDFViewController.swift
…repare`, obviously)
7bf8f64
to
8f8ec07
Compare
@@ -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. |
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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 { |
There was a problem hiding this comment.
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
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.