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

davepamn

Active Member
Licensed User
Longtime 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
Longtime 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:
Upvote 0

omidaghakhani1368

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

omidaghakhani1368

Well-Known Member
Licensed User
Longtime User
In your code exist nc.ShowPage(Page1) that show page and no needing to NavControl.ShowPage(Page1)
 
Upvote 0
Top