Chapter 28
Adopting Haptic Touch

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.

Figure 28-1. Sample Quick Actions
Figure 28-1. Sample Quick Actions

In this chapter, I will go through with you how to implement quick actions in SwiftUI projects and create your custom URL type for handling these quick actions:

  • New Restaurant - go to the New Restaurant screen directly
  • Discover restaurants - jump right into the Discover tab
  • Show Favorites - jump right into the Favorites tab

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.

results matching ""

    No results matching ""