YLPagesToolbar Class Reference
Inherits from | UIView |
Conforms to | YLCacheDelegate |
Declared in | YLPagesToolbar.h YLPagesToolbar.m |
Overview
This is the toolbar at the bottom in YLPDFViewController that displays the page thumbnails and also tracks which page number was tapped.
Tasks
Other Methods
-
delegate
Delegate that informs which page number was tapped.
property -
parentViewController
Reference to the parent YLPDFViewController.
property -
toolbar
Returns a reference to the UIToolbar object.
property -
– initWithFrame:document:
Initializes a YLPagesToolbar instance and returns it to the caller.
-
– updateThumbnails
This function calculates the number of thumbnails that should be shown and updates the toolbar. The parent YLPDFViewController uses this function to initialize the toolbar and after rotations to update the number of thumbnails shown based on the width of the resized toolbar.
Other Methods
-
– didCacheDocument:page:size:image:
Called when YLCache rendered a PDF page into an image.
Properties
delegate
Delegate that informs which page number was tapped.
@property (nonatomic, assign) NSObject<YLPagesToolbarDelegate> *delegate
Discussion
Delegate that informs which page number was tapped.
Declared In
YLPagesToolbar.h
parentViewController
Reference to the parent YLPDFViewController.
@property (nonatomic, assign) YLPDFViewController *parentViewController
Discussion
Reference to the parent YLPDFViewController.
Declared In
YLPagesToolbar.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
initWithFrame:document:
Initializes a YLPagesToolbar instance and returns it to the caller.
- (id)initWithFrame:(CGRect)frame document:(YLDocument *)document
Return Value
An initialized YLPagesToolbar instance.
Discussion
Initializes a YLPagesToolbar instance and returns it to the caller.
Declared In
YLPagesToolbar.h
updateThumbnails
This function calculates the number of thumbnails that should be shown and updates the toolbar. The parent YLPDFViewController uses this function to initialize the toolbar and after rotations to update the number of thumbnails shown based on the width of the resized toolbar.
- (void)updateThumbnails
Discussion
This function calculates the number of thumbnails that should be shown and updates the toolbar. The parent YLPDFViewController uses this function to initialize the toolbar and after rotations to update the number of thumbnails shown based on the width of the resized toolbar.
Declared In
YLPagesToolbar.h