@nativescript/imagepicker
Version:
A plugin for the NativeScript framework implementing multiple image picker
27 lines (26 loc) • 1.27 kB
TypeScript
import { View } from '@nativescript/core';
import { AuthorizationResult, ImagePickerBase, ImagePickerSelection, Options } from './common';
export * from './common';
export declare class ImagePicker extends ImagePickerBase {
_imagePickerController: QBImagePickerController;
_hostView: View;
_delegate: ImagePickerControllerDelegate;
get hostView(): View;
get hostController(): UIViewController;
constructor(options: Options, hostView: View);
authorize(): Promise<AuthorizationResult>;
present(): Promise<ImagePickerSelection[]>;
_cleanup(): void;
}
declare class ImagePickerControllerDelegate extends NSObject implements QBImagePickerControllerDelegate {
_resolve: any;
_reject: any;
owner: WeakRef<ImagePicker>;
qb_imagePickerControllerDidCancel?(imagePickerController: QBImagePickerController): void;
qb_imagePickerControllerDidFinishPickingAssets?(imagePickerController: QBImagePickerController, iosAssets: NSArray<any>): Promise<any>;
static ObjCProtocols: {
prototype: QBImagePickerControllerDelegate;
}[];
static initWithOwner(owner: ImagePicker, resolve: any, reject: any): ImagePickerControllerDelegate;
}
export declare function create(options?: Options, hostView?: View): ImagePicker;