Inherits from UIScrollView
Conforms to UIScrollViewDelegate
Declared in YLScrollView.h
YLScrollView.m

Overview

This is the view that can display one or two PDF pages. It also serves as a container for these page views and can be used to zoom in and out.

Tasks

Other Methods

Initialization

Display Methods

Zoom Methods

  • – zoomInAnimated:

    Zooms in. The amount of zoom is calculated dynamically when minimum and maximum zoom levels are calculated. The ZOOM_LEVELS value defined in YLGlobal.h determines the amount of zoom levels.

  • – zoomOutAnimated:

    Zooms out. The amount of zoom is calculated dynamically when minimum and maximum zoom levels are calculated. The ZOOM_LEVELS value defined in YLGlobal.h determines the amount of zoom levels.

  • – resetZoomAnimated:

    Restores the zoom value to the default mininum zoom scale.

Helper Methods

Properties

documentLead

Document lead of the parent YLPDFViewController instance.

@property (nonatomic, assign) YLDocumentLead documentLead

Discussion

Document lead of the parent YLPDFViewController instance.

Declared In

YLScrollView.h

documentMode

Document mode of the parent YLPDFViewController instance.

@property (nonatomic, assign) YLDocumentMode documentMode

Discussion

Document mode of the parent YLPDFViewController instance.

Declared In

YLScrollView.h

leftPageView

Reference to the first page view.

@property (nonatomic, readonly) YLPageView *leftPageView

Discussion

Reference to the first page view.

Declared In

YLScrollView.h

page

Page number that is displayed (zero based). This will be the left page in double page mode.

@property (nonatomic, readonly) NSUInteger page

Discussion

Page number that is displayed (zero based). This will be the left page in double page mode.

Declared In

YLScrollView.h

pdfViewController

Reference to the parent YLPDFViewController instance.

@property (nonatomic, assign) YLPDFViewController *pdfViewController

Discussion

Reference to the parent YLPDFViewController instance.

Declared In

YLScrollView.h

rightPageView

Reference to the second page view. This will always be nil in single page mode.

@property (nonatomic, readonly) YLPageView *rightPageView

Discussion

Reference to the second page view. This will always be nil in single page mode.

Declared In

YLScrollView.h

Instance Methods

displayDocument:withPage:

Use this function to setup this YLScrollView instance.

- (void)displayDocument:(YLDocument *)document withPage:(NSUInteger)page

Parameters

document

Reference to the document.

page

Page number starting from 0.

Discussion

Use this function to setup this YLScrollView instance.

Declared In

YLScrollView.h

hideAnnotations

See YLPageView for the description of this function.

- (void)hideAnnotations

See Also

  • See YLPageView for the description of this function.

Declared In

YLScrollView.h

initWithFrame:

Initializes a YLScrollView instance and returns it to the caller.

- (id)initWithFrame:(CGRect)frame

Parameters

frame

Frame of this view.

Return Value

An initialized YLScrollView instance.

Discussion

Initializes a YLScrollView instance and returns it to the caller.

Declared In

YLScrollView.h

invalidate

Use this function to reset this YLScrollView instance. The internal page views will be removed so that this view can be re-used again.

- (void)invalidate

Discussion

Use this function to reset this YLScrollView instance. The internal page views will be removed so that this view can be re-used again.

Declared In

YLScrollView.h

resetZoomAnimated:

Restores the zoom value to the default mininum zoom scale.

- (void)resetZoomAnimated:(BOOL)animated

Parameters

animated

Boolean value that enables/disables animation.

Discussion

Restores the zoom value to the default mininum zoom scale.

Declared In

YLScrollView.h

showAnnotations

See YLPageView for the description of this function.

- (void)showAnnotations

See Also

  • See YLPageView for the description of this function.

Declared In

YLScrollView.h

updateContentViewsWithFrame:

Called by the parent YLPDFViewController to change the frame of this view.

- (void)updateContentViewsWithFrame:(CGRect)frame

Parameters

frame

New frame for this view.

Discussion

Called by the parent YLPDFViewController to change the frame of this view.

Declared In

YLScrollView.h

updateForSearchResults

See YLPageView for the description of this function.

- (void)updateForSearchResults

See Also

  • See YLPageView for the description of this function.

Declared In

YLScrollView.h

zoomInAnimated:

Zooms in. The amount of zoom is calculated dynamically when minimum and maximum zoom levels are calculated. The ZOOM_LEVELS value defined in YLGlobal.h determines the amount of zoom levels.

- (void)zoomInAnimated:(BOOL)animated

Parameters

animated

Boolean value that enables/disables animation.

Discussion

Zooms in. The amount of zoom is calculated dynamically when minimum and maximum zoom levels are calculated. The ZOOM_LEVELS value defined in YLGlobal.h determines the amount of zoom levels.

Declared In

YLScrollView.h

zoomOutAnimated:

Zooms out. The amount of zoom is calculated dynamically when minimum and maximum zoom levels are calculated. The ZOOM_LEVELS value defined in YLGlobal.h determines the amount of zoom levels.

- (void)zoomOutAnimated:(BOOL)animated

Parameters

animated

Boolean value that enables/disables animation.

Discussion

Zooms out. The amount of zoom is calculated dynamically when minimum and maximum zoom levels are calculated. The ZOOM_LEVELS value defined in YLGlobal.h determines the amount of zoom levels.

Declared In

YLScrollView.h