iOS Question NavBar after switching from TabControl to NavControl

ciginfo

Well-Known Member
Licensed User
Longtime User
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
 

Attachments

  • Try.zip
    151.2 KB · Views: 286

klaus

Expert
Licensed User
Longtime User
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.
 

Attachments

  • Try1.zip
    151.3 KB · Views: 342
Upvote 0

ciginfo

Well-Known Member
Licensed User
Longtime User
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
 
Upvote 0

valentino s

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

jazzzzzzz

Active Member
Licensed User
Longtime User
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..

Any ideas ?
 
Upvote 0

jazzzzzzz

Active Member
Licensed User
Longtime User
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).

dummy page is a nice idea,But the animation is too short,I have tested.
 
Upvote 0
Top