Join Tammy Coron for an in-depth discussion in this video An introduction to 3D Touch, part of iOS 9 3D Touch In Depth.
- View Offline
- [Voiceover] Let's start with a brief introduction to 3D Touch. 3D Touch was first introduced with iOS 9 on the iPhone 6s and iPhone 6s Plus devices. 3D Touch lets you interact with your device and apps using pressure-sensitive gestures. Several native apps incorporate 3D Touch and more support is added with each new release. What's nice is that 3D Touch is not limited to native apps.
As a developer, you can also incorporate 3D Touch into your own apps. So, what can 3D Touch do? Well, one of the coolest features of 3D Touch are Quick Actions, of which there are two, Home screen Quick Actions and Peek Quick Actions. With Home screen Quick Actions, users are able to press on the app icon, which then reveals a small menu of available actions. For example, with the Calendar app, users can quickly add a new event.
As a developer, you can implement Quick Actions within your own apps. In order to use Peek Quick Actions, you'll first need to understand Peek and Pop. Peek and Pop, which is sometimes referred to as Preview and Commit, allows users to get a preview of some content without having to leave the current view. With this functionality, users can lightly press on a web link or an item within a table view, and be shown a preview of that content.
If the user presses a little more deeply, a Pop will occur, and the user will be taken further into that content, complete with back buttons. Now, in order to access Quick Actions from a Peek view, users can swipe up to expose them, if they exist. These work exactly like the Home screen Quick Actions. In order for 3D Touch to work on a compatible device however the user must have 3D Touch Support enabled.
In this course, Tammy Coron walks through the 3D Touch API. She shows how to add static and dynamic quick actions, which allow you to display shortcuts for app-specific tasks. She also covers peek—for displaying live previews of items—and pop, which opens a detailed version of the peek view. Last but not least, she shows how to implement custom actions using UITouch's new properties: force and maximumPossibleForce.
- Accessibility and 3D Touch
- Checking for 3D Touch availability
- Understanding static vs. dynamic actions
- Working with peek and pop views
- Working with UITouch objects