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

davepamn

Active Member
Licensed User
B4X:
    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:

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:

omidaghakhani1368

Well-Known Member
Licensed User
Please remove NavControl.ShowPage(Page1)
When you use iSideMenu therefore dont show page with Main Navigation Controller
 
Top