Enabling Gesture In Your Application

By default the gesture events are treated as custom events and are not included in the available events list for actions to bind with. You will need to add them manually the same way that custom user events are added as described in the chapter Chapter 8, Connecting Events to Actions.

Right-click the control you want to add the action to, and select Add>Action. Then click the Add button to the right of the Event Filter text box.

You will see the New Event dialog box. This is where you add the gesture events to the list. You will need to do this for all the gesture events you want to use in your application, including gre.gesture.up, gre.gesture.down, gre.gesture.left, and gre.gesture.right

Now that you have added the gesture events to the application you will be able to select them in the events list pf the Add New Action dialog to trigger an action.

By default both single and multi touch gestures are disabled by the Storyboard Engine gesture plugin so we need to pass the -ogesture,mode=single option to the Storyboard Engine if using the command line or by selecting the appropriate Plugin Options in the simulator launch dialog. In this case single enables for single touch gestures while multi allows for both single and multi-touch gestures. These gesture plugin options are discussed in more detail in the gesture plugin options section of this document.

Once you have added the command-line option to sbengine, click Apply then Run and you now have gestures enabled in your Storyboard Application.