This repository has been archived by the owner on Apr 25, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 78
2.3 Delegate Methods
dzana edited this page Dec 9, 2014
·
3 revisions
- (void)fpPickerController:(FPPickerController *)pickerController didFinishPickingMediaWithInfo:(FPMediaInfo *)info;
- Called after Filepicker finished picking a media.
- At this point the associated media file should be present in
info.mediaURL
. - Properties in
info
:-
mediaURL
- A local
NSURL
pointing to the file- e.g:
assets-library://asset/asset.JPG?id=1000000001&ext=JPG
- e.g:
- A local
-
mediaType
- The
UTType
for the file- e.g:
public.image
- e.g:
- The
-
remoteURL
- A
NSString
with the URL for the file
- A
-
filename
- A
NSString
with the filename- e.g:
202342304.jpg
- e.g:
- A
-
filesize
(when available)- A
NSNumber
with the filesize in bytes- e.g:
1048576
- e.g:
- A
-
key
(when available)- An S3 key if the developer has set up Amazon S3 account at Filepicker.io
- e.g: JENAoTrDSPGFMrdxMd2R_photo.jpg
- An S3 key if the developer has set up Amazon S3 account at Filepicker.io
-
source
(when available)- A
FPSource
used for retrieving the media
- A
-
originalAsset
(when available; iOS only)- A
ALAsset
pointing to the original asset from the camera roll
- A
-
thumbnailImage
(when available; iOS only)- A thumbnail-sized
UIImage
representing the media (only applies to image media)
- A thumbnail-sized
-
- Methods in
info
:-
containsImageAtMediaURL
- YES if
mediaURL
contains an image; no otherwise
- YES if
-
containsVideoAtMediaURL
- YES if
mediaURL
contains a video; no otherwise
- YES if
-
- (void)fpPickerController:(FPPickerController *)pickerController didPickMediaWithInfo:(FPMediaInfo *)info;
- Called after Filepicker picked a media.
- Properties in
info
:-
thumbnailImage
(when available; iOS only)- A thumbnail-sized
UIImage
representing the media
- A thumbnail-sized
-
- (void)fpPickerControllerDidCancel:(FPPickerController *)pickerController;
- Typically called when the picking process is cancelled or a file can't be handled.
- (void)fpPickerController:(FPPickerController *)pickerController didFinishPickingMultipleMediaWithResults:(NSArray *)results;
- Called after Filepicker finished picking multiple media.
- At this point the associated media file for each item should be present at info.mediaURL.
- (void)fpSaveController:(FPSaveController *)saveController didFinishSavingMediaWithInfo:(FPMediaInfo *)info;
- Called after Filepicker finished saving a media.
- (void)fpSaveController:(FPSaveController *)saveController didError:(NSError *)error;
- Called when Filepicker failed saving a media.
- (void)fpSaveControllerDidCancel:(FPSaveController *)saveController;
- Typically called when the save process is cancelled or a file can't be handled.