ios - Swipe Left to go Back -
With OnsenUI 1.10, there is a way to swipe left to go to the previous page?
OnsenUI, the app can see very native, however, swipe-left IOS 7 gesture is important for my user experience.
I noticed: where the user can swipe left to go to the previous page (on desktop environment, you can drag from left to right)
Any ideas?
A solution is to use the hammer included in the onson UI. You can trace the gesture and can act, for example,
ons.bootstrap (); Hammer (window, {stop_default: true}) .on ("swiperight", function (event) {if (myNavigator.getPages (). Length & gt; 1) {myNavigator.popPage ();}});
Where myNavigator is defined
& lt; On-navigator title = "navigator" var = "myNavigator" page = "page 1.html" & gt; & Lt; / On-navigator & gt;
Note that in the above example, we do not use the AngularJS controller and access the Navigator directly. This is a new feature of Ocean UI 1.1.0.
Comments
Post a Comment