@Hesters wrote:
Hi everyone!
My basic question is: How do you swipe between pages up and down? I would like to have it so the page transition gets animated just as if you push a page on the navCtrl. Let me explain in more detail.
Here is my code for being able to swipe left and right:
HTML:
<ion-content (swipe)="swipeEvent($event)" padding> <ion-list> <button ion-item *ngFor="let item of items"> {{ item.text }} </button> </ion-list> </ion-content>Typescript:
swipeEvent(e) { if (e.direction == 4) { this.navCtrl.pop(); } }I use direction == 2 for the swipe left to get to the page (push) and swipe right to go back (pop). The animation then transitions the page in from right to left, when I push. And the animations shows the page being wiped out from left to right when I pop.
So my questions are:
Is there a more efficient way to swipe between pages (left / right)?
How do I get the swipeEvent to recognize up and down (e.direction == 8 / 16 for up and down doesn't work)?
How do I get the page to be animated, that it transitions in from bottom to top when I push and transitions away from top to bottom when I pop?I use Ionic 3.x on iOS Sierra on Mac.
Any help is much appreciated! Thank you for your help in advance
Posts: 1
Participants: 1
