FPKOverlayManager Class Reference
Inherits from | NSObject |
Conforms to | FPKOverlayViewDataSource MFDocumentViewControllerDelegate |
Declared in | FPKOverlayManager.h FPKOverlayManager.m |
Overview
This class is the core for the Extensions. You are supposed to subclass it (OverlayManager is an example) to enable or disable extensions.
Tasks
-
documentViewController
You need to assign to the FPKOverlayManager the MFDocumentViewController in order to access its MFDocumentManager and the coordinate conversion methods.
property -
– setExtensions:
Method to set the supported Extensions.
-
– initWithExtensions:
You can init this object passing the extensions as array, or use the standard init method and then set the extensions manually.
-
– showAnnotationForOverlay:withRect:andUri:onPage:
Method that is called to transform a pdf annotation into a
UIView
that will be added over the pdf page. The method itself checks if there is an Extension that support the url prefix and pass every parameter to the Extension. -
– overlayViewWithTag:
This method will search on the subviews for the one with a desired tag.
Properties
documentViewController
You need to assign to the FPKOverlayManager the MFDocumentViewController in order to access its MFDocumentManager and the coordinate conversion methods.
@property (nonatomic, assign) MFDocumentViewController<FPKOverlayManagerDelegate> *documentViewController
Discussion
You need to assign to the FPKOverlayManager the MFDocumentViewController in order to access its MFDocumentManager and the coordinate conversion methods.
Declared In
FPKOverlayManager.h
Instance Methods
initWithExtensions:
You can init this object passing the extensions as array, or use the standard init method and then set the extensions manually.
- (FPKOverlayManager *)initWithExtensions:(NSArray *)ext
Parameters
- ext
An array of strings that should contain every supported annotation like FPKMap, FPKYouTube, ecc.
[[anOverlayManager alloc] initWithExtensions:[[NSArray alloc] initWithObjects:@"FPKMap", @"FPKYouTube", nil]];
Discussion
You can init this object passing the extensions as array, or use the standard init method and then set the extensions manually.
Declared In
FPKOverlayManager.h
overlayViewWithTag:
This method will search on the subviews for the one with a desired tag.
- (UIView *)overlayViewWithTag:(int)tag
Parameters
- tap
The tag of the desired view.
Return Value
The view for the corresponding tag.
Discussion
This method will search on the subviews for the one with a desired tag.
Declared In
FPKOverlayManager.h
setExtensions:
Method to set the supported Extensions.
- (void)setExtensions:(NSArray *)ext
Parameters
- ext
An array of strings that should contain every supported annotation like FPKMap, FPKYouTube, ecc.
[anOverlayManager setExtensions:[[NSArray alloc] initWithObjects:@"FPKMap", @"FPKYouTube", nil]];
Discussion
Method to set the supported Extensions.
Declared In
FPKOverlayManager.h
showAnnotationForOverlay:withRect:andUri:onPage:
Method that is called to transform a pdf annotation into a UIView
that will be added over the pdf page. The method itself checks if there is an Extension that support the url prefix and pass every parameter to the Extension.
- (UIView *)showAnnotationForOverlay:(BOOL)load withRect:(CGRect)rect andUri:(NSString *)uri onPage:(NSUInteger)page
Parameters
- load
If the method is called when the pdf page is going to be drawn the value should be YES, otherwise NO (usually when a user tapped on the page over the annotation rect).
- rect
The CGRect in page coordinates of the annotation as extracted from the pdf tree.
- uri
The uri contained in the annotation hyperlink in the form prefix://path?param1¶m2.
- page
The pdf page that is requesting the view for the annotation.
Return Value
The UIView
that has been created by the right Extension and will be added over the page.
Discussion
Method that is called to transform a pdf annotation into a UIView
that will be added over the pdf page. The method itself checks if there is an Extension that support the url prefix and pass every parameter to the Extension.
Declared In
FPKOverlayManager.h