Scale tool with Gesture Recognizer

The next tool we'll implement is the Scale tool that lets you resize the picture. Like the Move tool, it uses an update sequencing design pattern to implement a modal manipulation tool. However, we'll use a different user scenario, and a different underlying implementation.

The Scale tool will work like this:

  • Pressing and holding the button using the finger-thumb pinch gesture will activate the scale manipulation mode. The button will grow enlarged to show it is activated.
  • As you continue to hold the pinch gesture and move your gaze to the right, the picture object gets bigger. Move your gaze to the left and the picture shrinks.
  • Releasing the pinch gesture (unclicking the button) deactivates Move mode, ...

Get Augmented Reality for Developers 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.