Added save to gallery option - IOS only

This commit is contained in:
victorsosa
2016-05-06 16:23:55 -04:00
parent 93004b06f4
commit 63b581492d

View File

@ -15,6 +15,7 @@ class UIImagePickerControllerDelegateImpl extends NSObject implements UIImagePic
private _width: number;
private _height: number;
private _keepAspectRatio: boolean;
private _saveToGallery: boolean;
public initWithCallback(callback: (result?) => void): UIImagePickerControllerDelegateImpl {
this._callback = callback;
@ -60,7 +61,9 @@ class UIImagePickerControllerDelegateImpl extends NSObject implements UIImagePic
if (this._callback) {
this._callback(imageSourceResult);
UIImageWriteToSavedPhotosAlbum(imageSourceResult, nil, nil, nil);
if(this._saveToGallery) {
UIImageWriteToSavedPhotosAlbum(imageSourceResult, nil, nil, nil);
}
}
}
}