YLPDFViewController Class Reference
Inherits from | UIViewController |
Declared in | YLPDFViewController.h YLPDFViewController.m |
Tasks
Other Methods
-
document
Document that should be displayed.
property -
currentPage
Current page number (zero based). This value will always the left page number when in double page mode.
property -
viewMode
Current view mode.
property -
documentMode
Current document mode.
property -
documentLead
Current document lead.
property -
pageCurlEnabled
Default value is NO. Use this property to enable page-curl animations.
property -
autoLayoutEnabled
Default value is NO. Use this property to enable auto-layout. Auto-layout will show single pages in portrait mode and double pages in landscape mode. Note: auto-layout only works in YLDocumentModeDouble mode. Be sure that the document mode is set to double pages before enabling auto-layout.
property -
delegate
Reference to the delegate that should be informed.
property -
datasource
Reference to the datasource that should be used to request additional information.
property
Initialization
-
– initWithDocument:
Initializes a YLPDFViewController object and returns it to the caller.
Toolbar Handling
-
– showToolbarsAnimated:
Shows the top and bottom toolbars.
-
– hideToolbarsAnimated:
Hides the top and bottom toolbars.
-
– toggleToolbarsAnimated:
Toggles the visibility of the top and bottom toolbars.
Page Scrolling
-
– scrollToPage:animated:
Scrolls to the specified page.
-
– scrollToNextPageAnimated:
Scrolls to the next page if there is one.
-
– scrollToPreviousPageAnimated:
Scrolls to the previous page if there is one.
Helper Methods
-
– presentModalViewController:animated:
This function is used by the annotation views to present a modal view controller.
-
– clearSearchResults
This function is used by the search view controller to clear previous text-highlights on pdf pages.
Properties
autoLayoutEnabled
Default value is NO. Use this property to enable auto-layout. Auto-layout will show single pages in portrait mode and double pages in landscape mode. Note: auto-layout only works in YLDocumentModeDouble mode. Be sure that the document mode is set to double pages before enabling auto-layout.
@property (nonatomic, assign) BOOL autoLayoutEnabled
Discussion
Default value is NO. Use this property to enable auto-layout. Auto-layout will show single pages in portrait mode and double pages in landscape mode. Note: auto-layout only works in YLDocumentModeDouble mode. Be sure that the document mode is set to double pages before enabling auto-layout.
Declared In
YLPDFViewController.h
currentPage
Current page number (zero based). This value will always the left page number when in double page mode.
@property (nonatomic, readonly) NSUInteger currentPage
Discussion
Current page number (zero based). This value will always the left page number when in double page mode.
Declared In
YLPDFViewController.h
datasource
Reference to the datasource that should be used to request additional information.
@property (nonatomic, assign) IBOutlet NSObject<YLPDFViewControllerDataSource> *datasource
Discussion
Reference to the datasource that should be used to request additional information.
Declared In
YLPDFViewController.h
delegate
Reference to the delegate that should be informed.
@property (nonatomic, assign) IBOutlet NSObject<YLPDFViewControllerDelegate> *delegate
Discussion
Reference to the delegate that should be informed.
Declared In
YLPDFViewController.h
document
Document that should be displayed.
@property (nonatomic, retain) YLDocument *document
Discussion
Document that should be displayed.
Declared In
YLPDFViewController.h
documentLead
Current document lead.
@property (nonatomic, assign) YLDocumentLead documentLead
Discussion
Current document lead.
Declared In
YLPDFViewController.h
documentMode
Current document mode.
@property (nonatomic, assign) YLDocumentMode documentMode
Discussion
Current document mode.
Declared In
YLPDFViewController.h
Instance Methods
clearSearchResults
This function is used by the search view controller to clear previous text-highlights on pdf pages.
- (void)clearSearchResults
Discussion
This function is used by the search view controller to clear previous text-highlights on pdf pages.
Declared In
YLPDFViewController.h
hideToolbarsAnimated:
Hides the top and bottom toolbars.
- (void)hideToolbarsAnimated:(BOOL)animated
Parameters
- animated
Boolean value that enables/disables animation.
Discussion
Hides the top and bottom toolbars.
Declared In
YLPDFViewController.h
initWithDocument:
Initializes a YLPDFViewController object and returns it to the caller.
- (id)initWithDocument:(YLDocument *)document
Parameters
- document
Model object of the PDF document.
Return Value
An initialized YLPDFViewController instance.
Discussion
Initializes a YLPDFViewController object and returns it to the caller.
Declared In
YLPDFViewController.h
presentModalViewController:animated:
This function is used by the annotation views to present a modal view controller.
- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated
Parameters
- modalViewController
The view controller that should be presented.
- animated
Boolean value that enables/disables animation.
Discussion
This function is used by the annotation views to present a modal view controller.
Declared In
YLPDFViewController.h
scrollToNextPageAnimated:
Scrolls to the next page if there is one.
- (void)scrollToNextPageAnimated:(BOOL)animated
Parameters
- animated
Boolean value that enables/disables animation.
Discussion
Scrolls to the next page if there is one.
Declared In
YLPDFViewController.h
scrollToPage:animated:
Scrolls to the specified page.
- (void)scrollToPage:(NSUInteger)page animated:(BOOL)animated
Parameters
- page
Page number starting from 0.
- animated
Boolean value that enables/disables animation.
Discussion
Scrolls to the specified page.
Declared In
YLPDFViewController.h
scrollToPreviousPageAnimated:
Scrolls to the previous page if there is one.
- (void)scrollToPreviousPageAnimated:(BOOL)animated
Parameters
- animated
Boolean value that enables/disables animation.
Discussion
Scrolls to the previous page if there is one.
Declared In
YLPDFViewController.h