YLPageView Class Reference
Inherits from | UIView |
Conforms to | YLCacheDelegate |
Declared in | YLPageView.h YLPageView.m |
Overview
This is the view that displays the actual PDF page either rendered as an image or rendered real-time by YLTiledView which layer is a CATiledLayer.
Tasks
Other Methods
-
pdfViewController
Reference to the parent YLPDFViewController instance.
property
Initialization
-
– initWithDocument:page:
Initializes a YLPageView object and returns it to the caller.
Helper Methods
-
– updateForSearchResults
This function checks the document scanner to see if there are any search results on this page that should be highlighted. If so, it enables tiling (rendering done by CATiledLayer) which will highlight text that matches the search term.
-
– enableTiling
Enables tiling. YLTiledView is initially not created for performance reasons. Instead of rendering the PDF page a pre-rendered image is shown. When the user zooms in (which is detected in the parent YLScrollView) tiling will be enabled.
-
– disableTiling
Disables tiling which means that the pre-rendered image is shown instead.
-
– showAnnotations
Used to load and show the annotations on this page view.
-
– hideAnnotations
Used to hide the annotations on this page view.
Other Methods
-
– didCacheDocument:page:size:image:
Called when YLCache rendered a PDF page into an image.
Properties
pdfViewController
Reference to the parent YLPDFViewController instance.
@property (nonatomic, assign) YLPDFViewController *pdfViewController
Discussion
Reference to the parent YLPDFViewController instance.
Declared In
YLPageView.h
Instance Methods
didCacheDocument:page:size:image:
Called when YLCache rendered a PDF page into an image.
- (void)didCacheDocument:(YLDocument *)document page:(NSUInteger)page size:(YLPDFImageSize)size image:(UIImage *)image
Parameters
- document
Reference to the document.
- page
Page number starting from 0.
- size
Size of the rendered image.
- image
Rendered image of the PDF page.
Discussion
Called when YLCache rendered a PDF page into an image.
Declared In
YLCache.h
disableTiling
Disables tiling which means that the pre-rendered image is shown instead.
- (void)disableTiling
Discussion
Disables tiling which means that the pre-rendered image is shown instead.
Declared In
YLPageView.h
enableTiling
Enables tiling. YLTiledView is initially not created for performance reasons. Instead of rendering the PDF page a pre-rendered image is shown. When the user zooms in (which is detected in the parent YLScrollView) tiling will be enabled.
- (void)enableTiling
Discussion
Enables tiling. YLTiledView is initially not created for performance reasons. Instead of rendering the PDF page a pre-rendered image is shown. When the user zooms in (which is detected in the parent YLScrollView) tiling will be enabled.
Declared In
YLPageView.h
hideAnnotations
Used to hide the annotations on this page view.
- (void)hideAnnotations
Discussion
Used to hide the annotations on this page view.
Declared In
YLPageView.h
initWithDocument:page:
Initializes a YLPageView object and returns it to the caller.
- (id)initWithDocument:(YLDocument *)document page:(NSUInteger)page
Parameters
- document
Reference to the document.
- page
Page number starting from 0.
Return Value
An initialized YLPageView instance.
Discussion
Initializes a YLPageView object and returns it to the caller.
Declared In
YLPageView.h
showAnnotations
Used to load and show the annotations on this page view.
- (void)showAnnotations
Discussion
Used to load and show the annotations on this page view.
Declared In
YLPageView.h
updateForSearchResults
This function checks the document scanner to see if there are any search results on this page that should be highlighted. If so, it enables tiling (rendering done by CATiledLayer) which will highlight text that matches the search term.
- (void)updateForSearchResults
Discussion
This function checks the document scanner to see if there are any search results on this page that should be highlighted. If so, it enables tiling (rendering done by CATiledLayer) which will highlight text that matches the search term.
Declared In
YLPageView.h