Friday, 8 March 2013

Recognize Vertical Swipe in Sencha Touch 2

 In Sencha Touch 2 , A event recogniser is used to recognise vertical swipe movements. This has been disabled by default in Sencha Touch and it has a performance impact when your application has vertical swipe.

If you wish to recognise vertical swipe movements in your application, below is the code you need to add inside Ext.Application();

Ext.application({

    eventPublishers: {
        touchGesture: {
            recognizers: {
                swipe: {
                    //this will include both vertical and horizontal swipe recognisers
                    xclass: 'Ext.event.recognizer.Swipe'
                }
            }
        }
    },
    name: 'AppName',
    launch: function() {
         Ext.create('AppName.view.Container', {fullscreen: true});

    }

});



 Hope you enjoyed this Post

No comments:

Post a Comment