Chapter 29
Adopting Haptic Touch and Context Menus
As your first app, the FoodPin app is already quite impressive. However, if you wish to enhance it further and incorporate some of the modern technologies offered by iOS devices, I have two additional chapters prepared for you.
Ever since the launch of the iPhone 6s and 6s Plus, Apple introduced us to an entirely innovative method of interacting with our phones known as 3D Touch. This feature adds a new dimension to the user interface and provides a unique user experience. With 3D Touch, the iPhone can not only detect your touch but also sense the amount of pressure you apply to the display.
Apple has been replacing 3D Touch with Haptic Touch on all iPhone models, starting from the iPhone 11, 11 Pro, and 11 Pro Max. Although Haptic Touch and 3D Touch have similarities, there are distinct differences between them. While 3D Touch relies on force touch, Haptic Touch is activated by a touch and hold gesture.
Have you ever tried pressing an app icon on the home screen with a bit more pressure? When you do so, a set of quick actions appears, allowing you to directly access specific parts of the app. This is an example of Haptic Touch in action, referred to as Quick Actions.
If you've used 3D Touch before, Peep and Pop is a very nice feature that gives users a quicker access to the app's contents. In iOS 13, this feature is replaced by Context Menus. It's very similar to Peep and Pop but with an instant access to a list of action items. What's more is that Context Menus work on all devices running on iOS 13 (or later).
So, you still have no ideas about Context Menus? Open the Photos app to try it out. When you touch and hold a thumbnail, you can bring the photo preview and a contextual menu that lets you have a quick access to some common functions. If you want more than a preview, just tap the photo preview to bring up a full view.
In this chapter, we will see how to work with context menus in iOS 13 (or later). More specifically, we will add Quick Actions and Context Menus to the FoodPin app.
To access the full version of the book, please get the full copy here. You will also be able to access the full source code of the project.