iOS Question Why am I getting an error message, "UINavigation as a child of view controller"?

Discussion in 'iOS Questions' started by davepamn, Mar 6, 2015.

  1. davepamn

    davepamn Active Member Licensed User

    Code:
    Private menuTable As TableView
        
    Private sideMenu As SideMenuController
    ...
    Private Sub Application_Start(nav as NavigationController)

        
    Dim nc As NavigationController
        nc.Initialize(
    "nc")
    'Was
    navcontrol=nav
    'Should be
        NavControl=nc

        Page1.Initialize(
    "Page1")
        Page1.Title = 
    "Login"
        Page1.RootPanel.Color = 
    Colors.White

        LeftPage.Initialize(
    "lp")
        LeftPage.RootPanel.Color=
    Colors.Red

        RightPage.Initialize(
    "rp")
        RightPage.RootPanel.Color=
    Colors.Yellow

        CreateMenu(RightPage)
        sideMenu.Initialize(LeftPage,NavControl,RightPage)
        sideMenu.RightMenuMaxWidth=
    70%x
        App.KeyController=sideMenu
        
    Dim b1 AsBarButton
        nc.ShowPage(Page1)

         b1.InitializeSystem(b1.ITEM_DONE, 
    "b1")

         Page1.TopLeftButtons=
    Array(sideMenu.CreateBarButton("Menu"),b1)

         NavControl.ShowPage(Page1)
    end Sub
     
    Last edited: Mar 6, 2015
  2. davepamn

    davepamn Active Member Licensed User

    I found the problem
    Was:
    NavControl=nav

    Should be:
    NavControl=nc
     
  3. davepamn

    davepamn Active Member Licensed User

    When I click on the menu, nothing happens

    I installed and ran the demo code on the iPad and the menu click does not work.
     
    Last edited: Mar 6, 2015
  4. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    Please remove NavControl.ShowPage(Page1)
    When you use iSideMenu therefore dont show page with Main Navigation Controller
     
  5. davepamn

    davepamn Active Member Licensed User

    How do you show page1?
     
  6. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    In your code exist nc.ShowPage(Page1) that show page and no needing to NavControl.ShowPage(Page1)
     
  7. davepamn

    davepamn Active Member Licensed User

    I still don't see a slide out menu. What version of software are you running?
     
  8. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    Please download sample and test it.
     

    Attached Files:

    Samplatiner likes this.
  9. davepamn

    davepamn Active Member Licensed User

    I did. It didn't work.
     
  10. omidaghakhani1368

    omidaghakhani1368 Well-Known Member Licensed User

    I dont know why didn't work
     
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