当前位置: 动力学知识库 > 问答 > 编程问答 >

ios - How to simulate 3D Touch in devices that don't support this feature?

问题描述:

How can I simulate 3D Touch in my app, like in the Instagram app?

Instagram simulates 3D Touch in all devices.

Now that Telegram allows this feature, it is possible to see the coversation without entering in the chat.

This is an example:

If I press a photo for a few seconds, I obtain a preview of the photo.

网友答案:

3D touch is based on the sensors built into the latest version of iPhone. A "3D" touch is not recognized by length of touch but rather by pressure exerted on the display. A simple way that one could allow user access to the benefits of 3D touch without the user having the device with such capabilities would be to implement a touch-timer in which a long touch(2-3 seconds?) would be recognized as a long touch and allow access to extended features.

分享给朋友:
您可能感兴趣的文章:
随机阅读: