Including user interaction

Let's add some user interaction to the app. Instead of just making the virtual content appear in the scene from the beginning, we will make it appear when the user taps the screen. For that, follow these steps:

  1. In Main.storyboard, click on the library button (the square inside a circle button) and look for Tap Gesture Recognizer. Drag it onto the view:

Selecting Tap Gesture Recognizer from the library
  1. It will appear on the hierarchy, as shown in the following screenshot:

Tap Gesture Recognizer in the View Controller ...

Get Enterprise Augmented Reality Projects now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.