Inherits from UIViewController
Conforms to UIScrollViewDelegate
Declared in MFDocumentViewController.h

Tasks

Properties

defaultEdgeFlipWidth

Default value to wich the current value will be reset to after each page change. Default is 0.1.

@property (nonatomic, readwrite) CGFloat defaultEdgeFlipWidth

Discussion

Default value to wich the current value will be reset to after each page change. Default is 0.1.

Declared In

MFDocumentViewController.h

defaultMaxZoomScale

This is the default maximum magnification the pdf will zoom.

@property (nonatomic, readwrite) float defaultMaxZoomScale

Discussion

This is the default maximum magnification the pdf will zoom.

Declared In

MFDocumentViewController.h

directionalLockEnabled

This property enable or disable the directional lock in the inner (document) scroll view. Default is NO.

@property (nonatomic, readwrite, getter=isDirectionLockEnabled) BOOL directionalLockEnabled

Discussion

This property enable or disable the directional lock in the inner (document) scroll view. Default is NO.

Declared In

MFDocumentViewController.h

documentDelegate

This property let you add the main DocumentViewControllerDelegate.

@property (assign) NSObject<MFDocumentViewControllerDelegate> *documentDelegate

Discussion

This property let you add the main DocumentViewControllerDelegate.

Declared In

MFDocumentViewController.h

documentInteractionEnabled

Enabled the document interaction.

@property (assign, readwrite, getter=isDocumentInteractionEnabled) BOOL documentInteractionEnabled

Discussion

Enabled the document interaction.

Declared In

MFDocumentViewController.h

fpkAnnotationsEnabled

Enable or disable FPK Annotations parsing at page load. Set it to NO if you don’t use FPK Annotations and experience freezing while scrolling the pages. Default is YES (enabled).

@property (nonatomic, readwrite) BOOL fpkAnnotationsEnabled

Discussion

Enable or disable FPK Annotations parsing at page load. Set it to NO if you don’t use FPK Annotations and experience freezing while scrolling the pages. Default is YES (enabled).

Declared In

MFDocumentViewController.h

legacyModeEnabled

Enabled or force the legacy mode, or let the app choose to enable it or not depending on the device. Default is disabled.

@property (readwrite) BOOL legacyModeEnabled

Discussion

Enabled or force the legacy mode, or let the app choose to enable it or not depending on the device. Default is disabled.

Declared In

MFDocumentViewController.h

overlayEnabled

Enable or disable the display of overlay item over the document. Default is disabled.

@property (readwrite) BOOL overlayEnabled

Discussion

Enable or disable the display of overlay item over the document. Default is disabled.

Declared In

MFDocumentViewController.h

padding

Set the amount of minimum padding between the pages and the screen edge. Default is 5.0. Values are clipped between 0 and 100.

@property (nonatomic, readwrite) CGFloat padding

Discussion

Set the amount of minimum padding between the pages and the screen edge. Default is 5.0. Values are clipped between 0 and 100.

Declared In

MFDocumentViewController.h

pageFlipOnEdgeTouchEnabled

Enable the page flip when the user touch the edges of the screen.

@property (assign, readwrite, getter=isPageFlipOnEdgeTouchEnabled) BOOL pageFlipOnEdgeTouchEnabled

Discussion

Enable the page flip when the user touch the edges of the screen.

Declared In

MFDocumentViewController.h

pagedScrollView

Access the inner paged scroll view.

@property (readonly) UIScrollView *pagedScrollView

Discussion

Access the inner paged scroll view.

Declared In

MFDocumentViewController.h

previewsCount

Set the max number of preview images to use at any time. Call this before presenting the MFDocumentViewController subclass. Default is 4, sweet spot is 3-4 and you should not exceed this number unless your target device are iPhone4 iPad2 or newer devices and/or your PDF are scarce of images.

@property (nonatomic, readwrite) NSUInteger previewsCount

Discussion

Set the max number of preview images to use at any time. Call this before presenting the MFDocumentViewController subclass. Default is 4, sweet spot is 3-4 and you should not exceed this number unless your target device are iPhone4 iPad2 or newer devices and/or your PDF are scarce of images.

Declared In

MFDocumentViewController.h

showHorizontalScroller

Use this property to hide or show the horizontal scroller under the pages.

@property (nonatomic, readwrite) BOOL showHorizontalScroller

Discussion

Use this property to hide or show the horizontal scroller under the pages.

Declared In

MFDocumentViewController.h

showShadow

Set this flag to NO if you don’t want the dropdown shadow under the pages. Default is YES.

@property (nonatomic, readwrite) BOOL showShadow

Discussion

Set this flag to NO if you don’t want the dropdown shadow under the pages. Default is YES.

Declared In

MFDocumentViewController.h

startingPage

Set the starting page of the document. It is valid only after initialization and before the view is displayed on the screen. Tipically you want to set this just after the init of the viewController. Default is 1.

@property (nonatomic, readwrite) NSUInteger startingPage

Discussion

Set the starting page of the document. It is valid only after initialization and before the view is displayed on the screen. Tipically you want to set this just after the init of the viewController. Default is 1.

Declared In

MFDocumentViewController.h

useTiledOverlayView

This property will enable an CATiledLayer version of the overlay view. This means overlay drawables will be drawn sharp, no matter the zoom of the scroll view.

@property (readwrite) BOOL useTiledOverlayView

Discussion

This property will enable an CATiledLayer version of the overlay view. This means overlay drawables will be drawn sharp, no matter the zoom of the scroll view.

Declared In

MFDocumentViewController.h

zoomInOnDoubleTapEnabled

Enabled the zoom in when the user double tap on the screen.

@property (assign, readwrite, getter=isZoomInOnDoubleTapEnabled) BOOL zoomInOnDoubleTapEnabled

Discussion

Enabled the zoom in when the user double tap on the screen.

Declared In

MFDocumentViewController.h

Instance Methods

addDocumentDelegate:

If you need to register objects as DocumentViewControllerDelegate you can add them using this method.

- (void)addDocumentDelegate:(NSObject<MFDocumentViewControllerDelegate> *)delegate

Discussion

If you need to register objects as DocumentViewControllerDelegate you can add them using this method.

Declared In

MFDocumentViewController.h

addOverlayDataSource:

Add and remove an Overlay Datasource for Drawables and Touchables.

- (void)addOverlayDataSource:(id<MFDocumentOverlayDataSource>)ods

Discussion

Add and remove an Overlay Datasource for Drawables and Touchables.

Declared In

MFDocumentViewController.h

addOverlayViewDataSource:

Add an Overlay View Datasource for overlay UIViews.

- (void)addOverlayViewDataSource:(id<FPKOverlayViewDataSource>)ovds

Discussion

Add an Overlay View Datasource for overlay UIViews.

Declared In

MFDocumentViewController.h

automodeOnRotation

This metod enable or disable the automatic mode switching upon rotation. If enabled, the page mode will be automatically changed to single page in portrait and side-by-side (double) on landscape. Setting the mode manually will disable the automode.

- (BOOL)automodeOnRotation

Discussion

This metod enable or disable the automatic mode switching upon rotation. If enabled, the page mode will be automatically changed to single page in portrait and side-by-side (double) on landscape. Setting the mode manually will disable the automode.

Declared In

MFDocumentViewController.h

autozoomOnPageChange

Returns whether the autozoom feature is enabled or not.

- (BOOL)autozoomOnPageChange

Discussion

Returns whether the autozoom feature is enabled or not.

Declared In

MFDocumentViewController.h

cleanUp

Call this method rightly after dismissing this MFDocumentViewController instance. It will release all the resources and stop the background threads. Once this method has been called, the MFDocumentViewController instance cannot be considered valid anymore and should be released.

- (void)cleanUp

Discussion

Call this method rightly after dismissing this MFDocumentViewController instance. It will release all the resources and stop the background threads. Once this method has been called, the MFDocumentViewController instance cannot be considered valid anymore and should be released.

Declared In

MFDocumentViewController.h

convertPoint:fromOverlayToPage:

Convert a point from overlay space (the whole view that hold the both left and right page, and that you can zoom in and scroll over) to page space.

- (CGPoint)convertPoint:(CGPoint)point fromOverlayToPage:(NSUInteger)page

Discussion

Convert a point from overlay space (the whole view that hold the both left and right page, and that you can zoom in and scroll over) to page space.

Declared In

MFDocumentViewController.h

convertPoint:fromViewtoPage:

Convert a point from MFDocumentViewController’s view space to page space.

- (CGPoint)convertPoint:(CGPoint)point fromViewtoPage:(NSUInteger)page

Discussion

Convert a point from MFDocumentViewController’s view space to page space.

Declared In

MFDocumentViewController.h

convertPoint:toOverlayFromPage:

Convert a point from page space to overlay space.

- (CGPoint)convertPoint:(CGPoint)point toOverlayFromPage:(NSUInteger)page

Discussion

Convert a point from page space to overlay space.

Declared In

MFDocumentViewController.h

convertPoint:toViewFromPage:

Convert a point from page space to MFDocumentViewController’s view space.

- (CGPoint)convertPoint:(CGPoint)point toViewFromPage:(NSUInteger)page

Discussion

Convert a point from page space to MFDocumentViewController’s view space.

Declared In

MFDocumentViewController.h

convertRect:fromOverlayToPage:

Convert a rect from overlay space to page space.

- (CGRect)convertRect:(CGRect)rect fromOverlayToPage:(NSUInteger)page

Discussion

Convert a rect from overlay space to page space.

Declared In

MFDocumentViewController.h

convertRect:fromViewToPage:

Convert a rect from MFDocumentViewController’s view space to page space.

- (CGRect)convertRect:(CGRect)rect fromViewToPage:(NSUInteger)page

Discussion

Convert a rect from MFDocumentViewController’s view space to page space.

Declared In

MFDocumentViewController.h

convertRect:toOverlayFromPage:

Convert a ract from page to overlay space.

- (CGRect)convertRect:(CGRect)rect toOverlayFromPage:(NSUInteger)page

Discussion

Convert a ract from page to overlay space.

Declared In

MFDocumentViewController.h

convertRect:toViewFromPage:

Convert a rect from page space to MFDocumentViewController’s view space.

- (CGRect)convertRect:(CGRect)rect toViewFromPage:(NSUInteger)page

Discussion

Convert a rect from page space to MFDocumentViewController’s view space.

Declared In

MFDocumentViewController.h

direction

Return the current direction used by the document.

- (MFDocumentDirection)direction

Discussion

Return the current direction used by the document.

Declared In

MFDocumentViewController.h

edgeFlipWidth

Get the edge flip width

- (CGFloat)edgeFlipWidth

Discussion

Get the edge flip width

Declared In

MFDocumentViewController.h

gesturesDisabled

Override in your subclass to toggle gesture recognizer on overlay views on and off.

- (BOOL)gesturesDisabled

Discussion

Override in your subclass to toggle gesture recognizer on overlay views on and off.

Declared In

MFDocumentViewController.h

initWithDocumentManager:

Call this method to start working with the pdf.

- (id)initWithDocumentManager:(MFDocumentManager *)aDocumentManager

Discussion

Call this method to start working with the pdf.

Declared In

MFDocumentViewController.h

lead

Returns the current lead used when presenting the document.

- (MFDocumentLead)lead

Discussion

Returns the current lead used when presenting the document.

Declared In

MFDocumentViewController.h

leftPage

This method will return the page number of the left page displayed. If the mode is single page, the left page number is the current page.

- (NSUInteger)leftPage

Discussion

This method will return the page number of the left page displayed. If the mode is single page, the left page number is the current page.

Declared In

MFDocumentViewController.h

mode

Returns the current mode used to display the document.

- (MFDocumentMode)mode

Discussion

Returns the current mode used to display the document.

Declared In

MFDocumentViewController.h

moveToNextPage

This method will begin an animated transition to the next page, if available.

- (void)moveToNextPage

Discussion

This method will begin an animated transition to the next page, if available.

Declared In

MFDocumentViewController.h

moveToPreviousPage

This method will begin an animated transition to the previous page, if available.

- (void)moveToPreviousPage

Discussion

This method will begin an animated transition to the previous page, if available.

Declared In

MFDocumentViewController.h

page

Returns the current page of the document.

- (NSUInteger)page

Discussion

Returns the current page of the document.

Declared In

MFDocumentViewController.h

reloadOverlay

This method will provoke the redraw of the overlay. Overlay Datasources will be asked to provide drawables.

- (void)reloadOverlay

Discussion

This method will provoke the redraw of the overlay. Overlay Datasources will be asked to provide drawables.

Declared In

MFDocumentViewController.h

removeDocumentDelegate:

If you have more than one DocumentViewControllerDelegate you can remove any of them with this method.

- (void)removeDocumentDelegate:(NSObject<MFDocumentViewControllerDelegate> *)delegate

Discussion

If you have more than one DocumentViewControllerDelegate you can remove any of them with this method.

Declared In

MFDocumentViewController.h

removeOverlayViewDataSource:

Remove an Overlay View Datasource for overlay UIViews.

- (void)removeOverlayViewDataSource:(id<FPKOverlayViewDataSource>)ovds

Discussion

Remove an Overlay View Datasource for overlay UIViews.

Declared In

MFDocumentViewController.h

rightPage

This method will return the page number of the right page displayed. If the mode is single, right page number is invalid.

- (NSUInteger)rightPage

Discussion

This method will return the page number of the right page displayed. If the mode is single, right page number is invalid.

Declared In

MFDocumentViewController.h

setAutoMode:

Set the mode to which the document will automatically switch to upon rotation. Pass MFDocumentAutoModeX values and not MFDocumentModeX values, since it is not guaranteed to be the same.

- (void)setAutoMode:(MFDocumentAutoMode)newAutoMode

Discussion

Set the mode to which the document will automatically switch to upon rotation. Pass MFDocumentAutoModeX values and not MFDocumentModeX values, since it is not guaranteed to be the same.

Declared In

MFDocumentViewController.h

setAutomodeOnRotation:

Returns whether automode is enabled or not.

- (void)setAutomodeOnRotation:(BOOL)automode

Discussion

Returns whether automode is enabled or not.

Declared In

MFDocumentViewController.h

setAutozoomOnPageChange:

This method will turn on or off the autozoom feature. If on, the current zoom level will be kept between pages, otherwise will be rest to 100% on page change.

- (void)setAutozoomOnPageChange:(BOOL)autozoom

Discussion

This method will turn on or off the autozoom feature. If on, the current zoom level will be kept between pages, otherwise will be rest to 100% on page change.

Declared In

MFDocumentViewController.h

setDirection:

This method is used to set the page reading direction: left to right or right to left.

- (void)setDirection:(MFDocumentDirection)newDirection

Discussion

This method is used to set the page reading direction: left to right or right to left.

Declared In

MFDocumentViewController.h

setEdgeFlipWidth:

Set and get the percentage of the screen associated with the page flip on edge touch action. Default value is 0.1, this mean that the 10% of the width of the screen on either side will receive such events. Values are clipped between 0.0 and 0.5 to prevent overlap.

- (void)setEdgeFlipWidth:(CGFloat)edgeFlipWidth

Discussion

Set and get the percentage of the screen associated with the page flip on edge touch action. Default value is 0.1, this mean that the 10% of the width of the screen on either side will receive such events. Values are clipped between 0.0 and 0.5 to prevent overlap.

Declared In

MFDocumentViewController.h

setLead:

This method set the lead used to show the pages in side-by-side (double) mode. With MFDocumentLeadLeft, the cover will appear on the left side in side-by-side mode, whereas with MFDocumentLeadRight will appear on the right side. Use this method to keep pairing between pages for books and magazines. Single page mode is not affected by this setting.

- (void)setLead:(MFDocumentLead)newLead

Discussion

This method set the lead used to show the pages in side-by-side (double) mode. With MFDocumentLeadLeft, the cover will appear on the left side in side-by-side mode, whereas with MFDocumentLeadRight will appear on the right side. Use this method to keep pairing between pages for books and magazines. Single page mode is not affected by this setting.

Declared In

MFDocumentViewController.h

setMaximumZoomScale:

Set the maximum zoom scale for the pdf page.

- (void)setMaximumZoomScale:(NSNumber *)scale

Discussion

Set the maximum zoom scale for the pdf page.

Declared In

MFDocumentViewController.h

setMode:

Set how the pages are presented to the user. MFDocumentModeSingle present a single page to the user, centered on the screen. MFDocumentModeDouble present two pages side-by-side, as they would appear on a magazine or a books. This will allow to preserve content split between the pages, for example a large background image.

- (void)setMode:(MFDocumentMode)newMode

Discussion

Set how the pages are presented to the user. MFDocumentModeSingle present a single page to the user, centered on the screen. MFDocumentModeDouble present two pages side-by-side, as they would appear on a magazine or a books. This will allow to preserve content split between the pages, for example a large background image.

Declared In

MFDocumentViewController.h

setPage:

This metod will set the current page of the document and jump to the specified page. Current page is used to determine bookmarks position. On side-by-side (double) mode, it is usually the left-most page of the two.

- (void)setPage:(NSUInteger)page

Discussion

This metod will set the current page of the document and jump to the specified page. Current page is used to determine bookmarks position. On side-by-side (double) mode, it is usually the left-most page of the two.

Declared In

MFDocumentViewController.h

setPage:withZoomOfLevel:onRect:

This metod will set the current page of the document and jump to the specified page, while trying to zoom in on the specified rect. Pass 0.0 as zoomLevel to let the application try to calculate the appropriate zoom level to fit the rectangle on screen.

- (void)setPage:(NSUInteger)page withZoomOfLevel:(float)zoomLevel onRect:(CGRect)rect

Discussion

This metod will set the current page of the document and jump to the specified page, while trying to zoom in on the specified rect. Pass 0.0 as zoomLevel to let the application try to calculate the appropriate zoom level to fit the rectangle on screen.

Declared In

MFDocumentViewController.h

setScrollEnabled:

Set the paged scroll enabled or not. Useful to lock the user in the current page during animations.

- (void)setScrollEnabled:(BOOL)lock

Discussion

Set the paged scroll enabled or not. Useful to lock the user in the current page during animations.

Declared In

MFDocumentViewController.h

zoomLevelForAnnotationRect:ofPage:

This will return the appropriate zoom level to perfectly zoom onto an annotation. If return 0, there’s no available page data to compute the zoom yet.

- (float)zoomLevelForAnnotationRect:(CGRect)rect ofPage:(NSUInteger)page

Discussion

This will return the appropriate zoom level to perfectly zoom onto an annotation. If return 0, there’s no available page data to compute the zoom yet.

Declared In

MFDocumentViewController.h

zoomOffset

Return the offset of the page scroll view.

- (CGPoint)zoomOffset

Discussion

Return the offset of the page scroll view.

Declared In

MFDocumentViewController.h

zoomScale

Return the zoom scale of the page scroll view.

- (float)zoomScale

Discussion

Return the zoom scale of the page scroll view.

Declared In

MFDocumentViewController.h