iPhone 6s 和iPhone 6s Plus添加了一个新的功能3D Touch。3D Touch技术允许用户进行更多的操作。
官方介绍地址:点击打开链接
1.快速操作
快速操作允许用户使用常用功能更加快速,许多操作只是在界面上按下。
2.peek和pop
在用户不打开应用的前提下,就可以预览或者操作内容,轻按后还可以进入应用。
3.压力敏感
有创意的app可以用多种方式使用压力感应。比如绘画应用中,根据压力画出不同粗细的线条。
功能介绍地址:点击打开链接
Guides and Sample Code
Get details on how to design and build 3D Touch enabled actions in your iPhone app on iOS 9.
Quick Actions
- ApplicationShortcuts: Using UIApplicationShortcutItem
- UIApplicationShortcutItem Class Reference
- UIMutableApplicationShortcutItem Class Reference
- UIApplicationShortcutIcon Class Reference
Peek and Pop
- ViewControllerPreviews: Using the UIViewController…
- UIPreviewAction Class Reference
- UIPreviewActionGroup Class Reference
- UIPreviewActionItem Protocol Reference
Pressure Sensitivity
用模拟器实现3D Touch解决方案:点击打开链接
重要的参考资料:
1.《Adopting 3D Touch on iPhone》
2.《浅谈3D Touch(1) — Home screen quick action》
3.《浅谈3D Touch(2) — UITouch && Peek && Pop》
5.《Add iOS 9’s Quick Actions shortcut support in 15 minutes right now !》
7.《iOS: 3D Touch, impressions and thoughts》
欢迎转载,请表明出处!