add 3D touch plugin docs

This commit is contained in:
Ibrahim Hadeed 2016-06-09 21:51:23 -04:00
parent 596948eeb3
commit 0c8bcf8b21

View File

@ -4,6 +4,7 @@ import {Observable} from 'rxjs/Observable';
* @name 3DTouch
* @description
* @usage
* Please do refer to the original plugin's repo for detailed usage. The usage example here might not be sufficient.
* ```
* import {ThreeDeeTouch, ThreeDeeTouchQuickAction, ThreeDeeTouchForceTouch} from 'ionic-native';
*
@ -58,12 +59,14 @@ export class ThreeDeeTouch {
/**
* You need an iPhone 6S or some future tech to use the features of this plugin, so you can check at runtime if the user's device is supported.
* @returns {Promise<boolean>} returns a promise that resolves with a boolean that indicates whether the plugin is available or not
*/
@Cordova()
static isAvailable(): Promise<boolean> {return; }
/**
* You can get a notification when the user force touches the webview. The plugin defines a Force Touch when at least 75% of the maximum force is applied to the screen. Your app will receive the x and y coordinates, so you have to figure out which UI element was touched.
* @returns {Observable<ThreeDeeTouchForceTouch>} Returns an observable that sends a `ThreeDeeTouchForceTouch` object
*/
@Cordova({
observable: true
@ -75,16 +78,26 @@ export class ThreeDeeTouch {
})
static configureQuickActions(quickActions: Array<ThreeDeeTouchQuickAction>): void {}
/**
* When a home icon is pressed, your app launches and this JS callback is invoked.
* @returns {Observable<any>} returns an observable that notifies you when he user presses on the home screen icon
*/
@Cordova({
observable: true
})
static onHomeIconPressed(): Observable<any> {return; }
/**
* UIWebView and WKWebView (the webviews powering Cordova apps) don't allow the fancy new link preview feature of iOS9.
*/
@Cordova({
sync: true
})
static enableLinkPreview(): void {}
/**
* Disabled the link preview feature, if enabled.
*/
@Cordova({
sync: true
})