找到你要的答案

Q:Testing 3D touch with iOS Simulator

Q:iOS模拟器3D触摸测试

Questions:

I was wondering if anyone has tried 3D touch feature on a simulator or rather anyone know whether it actually works there or not.

I know it's a hardware based feature and support is there only for latest iPhone 6S & iPhone 6S Plus models.

On an iPhone 6S simulator, I have tried with Hardware --> Force Touch Pressure --> Deep Press but no gain.

问题:

我想知道,如果有人试过3D触摸功能的模拟器或更确切地说,任何人知道它是否实际工作有或没有。

我知道这是一个基于硬件的功能和支持,只有最新的iPhone 6S &;iPhone 6S加模型。

在iPhone 6S的模拟器,我曾与硬件——>;力接触压力——>;深压但没有收获。

answer1: 回答1:

you must develop on a device that supports 3D Touch. Simulator does not support 3D Touch,the documentation from apple, if you need the more information related to this topic, visit this link.

Update

The iOS simulator with Xcode 7.3 beta has an option to Use Trackpad Force for 3D Touch

你必须开发一个设备,支持3D触摸。模拟器不支持3D触摸,文档来自苹果,如果您需要更多相关的信息,请访问此链接。

更新

iOS模拟器用Xcode 7.3测试版有一个选项,使用触控板的三维接触力

answer2: 回答2:

Yes, we can not on Xcode 7.0

BUt there is a way to simulate this by using https://github.com/DeskConnect/SBShortcutMenuSimulator

This saved me once. Hope could save you. Notice that this is using for Quick Actions of 3D force touch features.

是的,我们不能在Xcode 7

但有一种方法来模拟这种利用https://github.com/deskconnect/sbshortcutmenusimulator

This saved me once. Hope could save you. Notice that this is using for Quick Actions of 3D force touch features.

answer3: 回答3:

With Xcode 7.3 beta you can now use 3D touch using a Magic Trackpad 2 or the built-in in newer MacBooks.

在Xcode 7.3测试版现在可以使用Magic Trackpad 2或更新的MacBook内置使用3D触摸。

answer4: 回答4:

There's a bit of code here that allows you to test 3D Touch peek & pop in the simulator. Bear in mind this is code for iOS 9.0, and some of the internal/private methods have changed in 9.1 (Hint: the word 'Position' changed to 'Location' in one of the method names).

https://gist.github.com/nickfrey/07e2c6d8d2e5444fb91d

这里有一点代码,可以让你在模拟器中测试3D触摸。记住这是代码为iOS 9,和一些内部/私有方法改变9.1(提示:“位置”改为“定位”的一个方法名称)。

https://gist.github.com/nickfrey/07e2c6d8d2e5444fb91d

answer5: 回答5:

If you do not have Force Touch trackpad, and using simulator, you can use FLEX.

It works on my Xcode 7.2.1 and iPhone 6S simulator. But the tutorial to use in documentation is not quite right.

For peeking, You need to move a bit of your mouse cursor to let it work while holding Shift + Command.

For Popping, While holding Shift + Command during peeking, press Control 3 times to pop out. I think 3 times means the hardest force applied, as the document stated, each key contributes 1/3 of maximum possible force.

如果你没有力量触摸触控板,并使用模拟器,你可以使用Flex。

It works on my Xcode 7.2.1 and iPhone 6S simulator. But the tutorial to use in documentation is not quite right.

For peeking, You need to move a bit of your mouse cursor to let it work while holding Shift + Command.

For Popping, While holding Shift + Command during peeking, press Control 3 times to pop out. I think 3 times means the hardest force applied, as the document stated, each key contributes 1/3 of maximum possible force.

answer6: 回答6:

From Xcode 7.3 we can use Macbook's force touch trackpad to deliver touch pressure events to iOS simulator.

Ensure iPhone 6s/ iPhone 6s plus simulator is selected or else "Use trackpad ..." option will appear disabled

从Xcode 7.3可以使用MacBook的力量触摸板提供接触压力事件的iOS模拟器。

确保iPhone 6S / iPhone 6S加模拟器选择或者使用触控板…”选项将出现残疾

ios  iphone  ios-simulator  ios9  3dtouch