Inherits from UIView
Conforms to FPKView
Declared in FPKGallerySlide.h
FPKGallerySlide.m

Overview

This Extension is useful to create an image gallery with horizontal slide transitions and page indicator.

Usage

  • Prefix: galleryslide://
  • Import: #import <FPKGallerySlide/FPKGallerySlide.h>
  • String: @“FPKGallerySlide”

Prefix

galleryslide://

Resources and Parameters

  • any resource
    • images = ARRAY STRING the list of images separated by commas ,
    • loop = INT: times that the automatic slide needs to be performed, -1 to infinite, 0 for no loop

Sample url

galleryslide://?images=img1.png,img2.png,img3.png&loop=1

Tasks

Other Methods

  • – initWithParams:andFrame:from:

    This method is called by the FPKOverlayManager if the Extension supports the requested prefix. You should return the UIView to be placed over the page. You can also return nil and perform some other operations like presenting a modal view on the

Other Methods

  • – willRemoveOverlayView:

    The view will be notified if it will be removed from the screen. You can decide to perform some operations like stopping timers and release objects.

Other Methods

  • + acceptedPrefixes

    Get the accepted prefixes by an Extension encapsulated in an NSArray of NSString. Obviously you can support even just one prefix.

Other Methods

  • + respondsToPrefix:

    You should implement this method to return a BOOL value only on supported prefixes.

Other Methods

  • – rect

    The frame of the view can change when the pdf mode change and the device is rotated. The original frame is stored to perform the conversion on the fly when needed.

Other Methods

Class Methods

acceptedPrefixes

Get the accepted prefixes by an Extension encapsulated in an NSArray of NSString. Obviously you can support even just one prefix.

+ (NSArray *)acceptedPrefixes

Discussion

Get the accepted prefixes by an Extension encapsulated in an NSArray of NSString. Obviously you can support even just one prefix.

[NSArray arrayWithObjects:@"map", nil];

@return

Declared In

FPKView.h

respondsToPrefix:

You should implement this method to return a BOOL value only on supported prefixes.

+ (BOOL)respondsToPrefix:(NSString *)prefix

Parameters

prefix

The prefix in the form @"map".

Return Value

YES or NO if the prefix is support by the Extension.

Discussion

You should implement this method to return a BOOL value only on supported prefixes.

Declared In

FPKView.h

Instance Methods

initWithParams:andFrame:from:

This method is called by the FPKOverlayManager if the Extension supports the requested prefix. You should return the UIView to be placed over the page. You can also return nil and perform some other operations like presenting a modal view on the

- (UIView *)initWithParams:(NSDictionary *)params andFrame:(CGRect)frame from:(FPKOverlayManager *)manager

Parameters

params

This dictionary contains all the parameters extracted from the url

  • prefix the part in the url before ://
  • path the part in the url after ://
  • params another NSDictionary that contains the parsed parameters after the ://
    • resource the part before ?
    • … custom parameters included in the annotation separated by &
  • load YES if the call for the view is made when the pdf page is going to be loaded, NO if the call is made when the user taps on the annotation area
frame

The annotation frame in pdf page coordinates. If the padding parameter is specified in the url, the frame is a CGRectInset of the real annotation frame. This feature is useful if the pdf has been created with Adobe InDesign that creates the annotation 2 pixel wider than the original object. Just specify in the url a param ?padding=2 and the frame will be set accordingly.

manager

The FPKOverlayManager that can be used to perform many operations like accessing the MFDocumentViewController or the MFDocumentManager.

Return Value

UIView that will be placed over the pdf page by the FPKOverlayManager.

Discussion

This method is called by the FPKOverlayManager if the Extension supports the requested prefix. You should return the UIView to be placed over the page. You can also return nil and perform some other operations like presenting a modal view on the

Declared In

FPKView.h

rect

The frame of the view can change when the pdf mode change and the device is rotated. The original frame is stored to perform the conversion on the fly when needed.

- (CGRect)rect

Return Value

rect The original frame of the UIView.

Discussion

The frame of the view can change when the pdf mode change and the device is rotated. The original frame is stored to perform the conversion on the fly when needed.

Declared In

FPKView.h

setRect:

Set the original frame. More info on rect.

- (void)setRect:(CGRect)aRect

Parameters

rect

The original frame.

Discussion

Set the original frame. More info on rect.

Declared In

FPKView.h

willRemoveOverlayView:

The view will be notified if it will be removed from the screen. You can decide to perform some operations like stopping timers and release objects.

- (void)willRemoveOverlayView:(FPKOverlayManager *)manager

Parameters

manager

The manager is the sender. It could be useful.

Discussion

The view will be notified if it will be removed from the screen. You can decide to perform some operations like stopping timers and release objects.

Declared In

FPKView.h