iOS Question SidemenuController

Discussion in 'iOS Questions' started by Brian Robinson, Apr 9, 2015.

  1. Brian Robinson

    Brian Robinson Active Member Licensed User

    Does anyone know if it is possible to find out if a menu is open on the SideMenuController.

    It seems to be bad UI that you can open the menu with the button, but not close it with the button. I know the controller has a CloseMenu function, but I an work out how to know if the menu is open already and close it if it is, or open it if it isn't.

    I thought about storing a variable that kept track of which menu was open, but that won't work when it is opened by a swipe gesture.

    Any ideas? Or Erel, is it possible to expose a IsMenuOpen property?

  2. narek adonts

    narek adonts Well-Known Member Licensed User

    When the side menu page will be visible sidemenupagename_appear event will be raised
    Brian Robinson likes this.
  3. Brian Robinson

    Brian Robinson Active Member Licensed User

    Great - thanks for that Narek.

    Just so everyone knows, I used the Page_Appear event and the Page_Disappear events for the two pages I add to the SideMenuController, that then set a flag (MenuIsOpen) to true or false.

    Then in the BarButton code check the flag to determine if I am going to close the Page or Open it.

    Erel, It would be nice if this was handed by the SideMenuController as it mean four less Events to clutter up the code.

  4. narek adonts

    narek adonts Well-Known Member Licensed User

    To bypass the events you can sumply use
    If yoursidemenupage.visible then

    End if
    Brian Robinson likes this.
  5. Alberto Iglesias

    Alberto Iglesias Well-Known Member Licensed User

    Using the SideMenuController the Button or any object in main page is disabled when Opened, is correct?

    I can´t use a simple button or top left button to close the pageview? Only with gesture?

    Like this example: when touch this button I can open the pageview, but to close, don´t work, only with gesture.

  6. Erel

    Erel Administrator Staff Member Licensed User

    Alberto please start a new thread for this question.
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice