Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ionic 3 side menu not working in ios

My ionic side menu is working in android mobile but in ios i am not getting.

here is the code for .html

<button ion-button menuToggle icon-only class="menuButton"> 
  <ion-icon name="menu"></ion-icon>
</button>

<ion-menu [content]="mycontent">
  <ion-content>
    <ion-list>
      <p>some menu content, could be list items</p>
    </ion-list>
  </ion-content>
</ion-menu>

<ion-nav #mycontent ></ion-nav>

i dont understand where is my issue is if you need anything please let me know

my side menu is working in android and browser except ios

like image 276
Mohan Gopi Avatar asked May 06 '17 10:05

Mohan Gopi


2 Answers

Try adding type="overlay" to the sidemenu:

<ion-menu [content]="mycontent" type="overlay">
like image 148
Thomas Avatar answered Nov 07 '22 09:11

Thomas


use click function instead of menuToggle

<button ion-button icon-only start (click)="openSideMenu()">
     <ion-icon name="md-menu"></ion-icon>
</button>

open menu using

openSideMenu() {
   this.menuCtrl.enable(true)
    this.menuCtrl.toggle();    
}

disable menu before you push to new page

this.menuCtrl.enable(false)
like image 22
PRATHYUSH P Avatar answered Nov 07 '22 07:11

PRATHYUSH P