2017-05-06 87 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

回答