Native Script中的iOS 3D Touch支持

Dot*_*mer 10 javascript nativescript angular2-nativescript

我想通过Native Script在iOS中使用3D触控支持.目前有一个快速动作插件,但我想听听ForceTouchiOS设备的动作.我想使用本机iOS API执行此操作,但我不知道如何开始.同一作者
还有另一个Cordova插件,其中有一个函数,我们可以听取下面的强制触摸:

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
  });
Run Code Online (Sandbox Code Playgroud)

如何在NativeScript iOS中访问3D Touch API

Ric*_*ley 2

由于强制触摸在Android中没有类似的功能,因此没有NativeScript抽象。您必须使用 iOS 库本身。

如何使用本机库

iOS 强制触摸文档