Handling Pinch Events

Pinch is an interesting user action available on touch screens. A user can typically maximize or minimize the content/image using pinch events. There are a different set of pinch events which the Sencha Touch framework provides that we can use to implement some really great interaction. Here we will look at the available list of events related to pinch and how to handle them.

Getting ready

Make sure that you have set up your development environment by following the recipes outlined in Chapter 1.

How to do it...

Carry out the following steps:

  1. Add the following code after the component reference is retrieved using the Ext.getCmp method:
                pinch: this.handleEvent,
                pinchstart: this.handleEvent,
                pinchend: this.handleEvent,
  2. Deploy and ...

Get Sencha Touch Cookbook 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.