Slide 33
Slide 33 text
Plugin࡞
Delegateઃఆʢอଘʣ
- (void)photoEditor:(AdobeUXImageEditorViewController *)editor finishedWithImage:(UIImage *)image
{
// Handle the result image here
NSArray * paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask,
YES);
NSString * basePath = ([paths count] > 0) ? [paths objectAtIndex:0] : nil;
NSData *binaryData = UIImagePNGRepresentation(image);
[binaryData writeToFile:[basePath stringByAppendingPathComponent: @"result.png"] atomically:
YES];
CDVPluginResult *pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK
messageAsString: @"save"];
[editorController dismissViewControllerAnimated: YES completion: nil];
[self.commandDelegate sendPluginResult:pluginResult callbackId:callbackId];
}