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.2 OS X Usage Instructions
sonicbee9 edited this page Oct 26, 2014
·
3 revisions
#import <FPPicker/FPPickerMac.h>
// To create the object
FPPickerController *pickerController = [FPPickerController new];
// Set the delegate
pickerController.delegate = self;
// Ask for specific data types. (Optional) Default is all files
pickerController.dataTypes = @[@"text/plain"];
// Select and order the sources (Optional) Default is all sources
pickerController.sourceNames = @[FPSourceImagesearch, FPSourceDropbox];
/* Control if we should download the files for you.
* Default is YES.
* When a user selects a remote file, we'll download it and return the filedata to you.
*/
pickerController.shouldDownload = YES;
// Display it
[pickerController open];
// To create the object
FPSaveController *saveController = [FPSaveController new];
// Set the delegate
saveController.delegate = self;
// Ask for specific data mimetypes. (Optional) Default is all files
saveController.dataTypes = @[@"text/plain"];
// Select and order the sources (Optional) Default is all sources
saveController.sourceNames = @[
FPSourceCamera,
FPSourceCameraRoll,
FPSourceDropbox,
FPSourceFacebook,
FPSourceGmail,
FPSourceBox,
FPSourceGithub,
FPSourceGoogleDrive,
FPSourceImagesearch
];
// Set the data and data type to be saved
saveController.data = bitmapData;
saveController.dataType = browserItem.mimetype;
saveController.proposedFilename = browserItem.title;
// Display it
[saveController open];