Impossible to have a NavBar after switching from TabControl to NavControl.
I have a Tabbar with 3 items (Page1, Page2, page3). A button on Page1 which switches to NavControl and opens Page4 when clicking. I do not have on Page4 a NavBar with BackButton to come back to Page1.
Look at zip file joined.
How can I do?
Thank you
The problem is that you must add the back button yourself because you launch Page4 with button and not with the NavicationController.
Attached a modified version.
Thank you, it works fine. But I do not understand a line.
NavControl.ShowPage(Page4)
Because when I click on back button it does not show Page4 but Page1
B4X:
Sub Page4_BarButtonClick (Tag As String)
Select Tag
Case "Page1"
NavControl.ShowPage(Page4)
App.KeyController = TabControl
End Select
End Sub
NavControl.ShowPage(Page4)
should have been NavControl.ShowPage(Page1)
It seems that with App.KeyController = TabControl iOS goes back to page1.
I commented NavControl.ShowPage(Page4) and it goes back to page 1.
Just to highlight that this example is perfect to learn tabbarcontroller, keycontroller, the navcontroller and others things. The chart example is not as useful as this one.
Thank you very much.
How can we give the transition animation when clicking on the custom back button we created by this example?
Now it just shows the page without sliding animation,but usually when pressing the auto generated navigation bar back button will produce a sliding animation I need that too in this case..
I did try several things however they didn't work. You can try to add a "dummy" page before page 4 and switch to the tab controller when the dummy page appears (only after page4 appeared).
I did try several things however they didn't work. You can try to add a "dummy" page before page 4 and switch to the tab controller when the dummy page appears (only after page4 appeared).