2017-05-06 47 views
9

我想通過本機腳本在iOS中使用3D觸摸支持。目前有一個快速操作Plugin,但是我想要聽取iOS設備的ForceTouch操作。我想使用本機iOS API來做到這一點,但我不知道如何開始。
還有另外一個插件Cordova由同一作者,哪裏有我們可以監聽力倒是像下面的功能:本機腳本中的iOS 3D觸摸支持

ThreeDeeTouch.watchForceTouches(function(result) { 
    console.log("force touch % " + result.force); // 84 
    console.log("force touch timestamp " + result.timestamp); // 1449908744.706419 
    console.log("force touch x coordinate " + result.x); // 213 
    console.log("force touch y coordinate " + result.y); // 41 
    }); 

我如何可以訪問到3D觸摸API中NativeScript的iOS

回答