1. Black Friday Sale - 50% off

    B4A Standard for $29 instead of $59!
    Buy Now
    Dismiss Notice

iOS Question iSideMenu

Discussion in 'iOS Questions' started by mrossen, Nov 14, 2014.

  1. mrossen

    mrossen Active Member Licensed User

    Hi,

    Is there anyone there got the iSideMenu to Work.

    I have tried:

    Code:
    NavControl = Nav
       
        Page1.Initialize(
    "Page1")
        Page2.Initialize(
    "Page2")
        Page1.Title = 
    "Page 1"
        Page1.RootPanel.Color = 
    Colors.White
        Page1.RootPanel.LoadLayout(
    "main")
        Page2.RootPanel.LoadLayout(
    "pincard")
       
        NavControl.ShowPage(Page1)
       
        SideControl.Initialize(
    "Page2", NavControl, Null)
       
        SideControl.OpenGesturesEnabled = 
    True
        SideControl.CreateBarButton(
    "sm")
    Mogens
     
    Derek Johnson likes this.
  2. Erel

    Erel Administrator Staff Member Licensed User

    See the attached example.

    You need to make the SideManagerController the main controller:
    Code:
    Private Sub Application_Start (Nav As NavigationController)
       
    'create a new navigation controller   
       Dim nc As NavigationController
       nc.Initialize(
    "nc")
       NavControl = nc
       Page1.Initialize(
    "Page1")
       Page1.Title = 
    "Page 1"
       Page1.RootPanel.Color = 
    Colors.White
       Page1.RootPanel.LoadLayout(
    "1")
       
    Dim lp As Page
       lp.Initialize(
    "lp")
       lp.RootPanel.Color = 
    Colors.Red
       lp.RootPanel.LoadLayout(
    "1")
       
    Dim rp As Page
       rp.Initialize(
    "rp")
       rp.RootPanel.Color = 
    Colors.Green
       rp.RootPanel.LoadLayout(
    "1")
       smc.Initialize(lp, nc, rp)
       App.KeyController = smc
       nc.ShowPage(Page1)
       Page1.TopRightButtons = 
    Array(smc.CreateBarButton("right"))
       Page1.TopLeftButtons = 
    Array(smc.CreateBarButton("left"))
    End Sub
    Note that we don't use the Nav parameter at all.
     

    Attached Files:

    MikeH likes this.
  3. mrossen

    mrossen Active Member Licensed User

    Hi Erel,

    Thank you for this code example. I am wondering, is it possible to use the sidemenu with the tabcontroller?

    Mogens
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    No. It only works with NavigationController.
     
  5. cloner7801

    cloner7801 Active Member Licensed User

    Why
    Code:
    smc.CloseMenu
    Not work?
     
  6. Erel

    Erel Administrator Staff Member Licensed User

    Please start a new thread for this question and post the code and also explain what is not working as you expect.
     
    cloner7801 likes this.
Loading...
  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