Search code examples
iosobjective-cxcodemmdrawercontroller

iOS Left menu by button using MMDrawerController


I got some troubles making button for open/close leftside menu.

I made a button, but I can not configure it correctly, because I can't recognize whether the left view is open. It can be opened by swipe(special MMDrawer method), so I can't use a regular BOOL variable lika 'isOpen'. Also, I find it difficult to find a property for left view status (open/close).

I was surprised, that noone had trouble like this.


Solution

  • You could use the openSide property of MMDrawerController.

    The current open side of the drawer.

    Note this value will change as soon as a pan gesture opens a drawer, or when a open/close animation is finished.

    As soon as the left view is opened, the value should change to MMDrawerSideLeft.