在iPhone 6S或iPhone 6S Plus模拟器上模拟力触摸/ 3D触摸 [英] Simulate force touch / 3D touch on iPhone 6S or iPhone 6S Plus simulators

查看:280
本文介绍了在iPhone 6S或iPhone 6S Plus模拟器上模拟力触摸/ 3D触摸的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图在iPhone 6S或iPhone 6S Plus模拟器上使用Xcode 7 GM模拟力触摸。特别是,我试图模拟正在实施应用程序快捷方式的测试应用程序图标上的力触摸。

I am trying to simulate a force touch using Xcode 7 GM on the iPhone 6S or iPhone 6S Plus simulator. In particular, I am trying to simulate the force touch on the icon of the test app which is implementing Application Shortcuts.

如果有解决方案来模拟这个,请告诉我,我尝试了Watch模拟器用来模拟力触摸的长按,因为iPhone将其捕获为长按手势,所以无效。

Let me know if there is a solution to simulate this, I tried the long press which the Watch simulator uses to simulate force touch, didn't work since the iPhone captures it as a long press gesture.

更新:我已下载来自Apple的ViewControllerPreview示例代码。运行他们的示例应用程序我发现模拟器虽然是iPhone 6s,但不支持3D /强制触摸功能。如果我使用带强制触控功能的触控板的macbook,我仍然不确定它是否支持该功能。

Update: I downloaded the ViewControllerPreview Sample code from Apple. Running their sample application I see that the simulator, although an iPhone 6s, does not support for 3D / force touch feature. I am still unsure if it would support the feature if I were to be using a macbook with a force touch enabled trackpad.

编辑:拥有强力触控触控板的macbook的用户是否可以尝试使用触控板上的强制触控来模拟iPhone 6s或6s Plus模拟器上的3D触控?我的理论是,您可以使用新MacBook上的强制触控触控板来模拟新iPhone模拟器上的3D触控。添加注释,注意结果,如果你尝试它,我可以更新帖子。

Can someone with a macbook that has a force touch trackpad attempt to use the force touch on the trackpad to simulate 3D touch on the iPhone 6s or 6s Plus simulator? My theory is that you can maybe use the force touch trackpad on the new MacBooks to simulate the 3D touch on new iPhone simulators. Add a comment noting the results if you try it and I can update the post.

EDIT2:似乎新型号macbook专业版的Force Touch触控板没有帮助。

It seems that Force Touch trackpads on the newer model macbook pros do not help.

推荐答案

它说这里!在页面底部....

It says here! at the bottom of the page....


开发环境

Development Environment

Xcode 7支持3D Touch开发。 Xcode的所有调试功能都可用于实现新功能。

Xcode 7 supports 3D Touch development. All the debugging features of Xcode are available for implementing the new features.

请记住以下几点:

使用Xcode 7.0,您必须在支持3D Touch的设备上进行开发。 Xcode 7.0中的模拟器不支持3D Touch。

使用Xcode 7.0,您必须在代码中实现窥视和弹出视图控制器。 Xcode 7.0中的Interface Builder不为配置3D Touch的视图控制器或转换提供图形支持。

With Xcode 7.0 you must implement your peek and pop view controllers in code. Interface Builder in Xcode 7.0 does not provide graphical support for configuring view controllers or transitions for 3D Touch.

确保在启用和禁用3D Touch的情况下测试您的应用程序,确保所有功能都可供所有用户使用。在3D Touch设备上,您可以在设置>常规>辅助功能> 3D触摸中禁用3D触摸

Be sure to test your app with 3D Touch both enabled and disabled, ensuring that all features are available to all users. On a 3D Touch device, you can disable 3D Touch in Settings > General > Accessibility > 3D Touch

所以很遗憾看起来我们需要让我们亲自操作实际的设备。 : - (

So unfortunately it looks like we need to get our hands on the actual devices to do it. :-(

编辑.....

从Xcode 7.3开始,有一种方法可以做到这一点如果您的MacBook的触控板支持强制触控。请参阅@iPrabu的答案。

As of Xcode 7.3 there is a way to do this if your MacBook's trackpad supports force touch. See answer by @iPrabu.

这篇关于在iPhone 6S或iPhone 6S Plus模拟器上模拟力触摸/ 3D触摸的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆