Navigation from iOSViews to TabBarView and Back

Hi all,
I’m currently trying to convert our existing iOS app thats built in Appcelerator to Xojo
I can navigate through a set of views to a TabBarView, whether that’s iOSScreen, or a tabbar created in-code but I need to be able to close that TabBarView and be at the same point in the navigation stack I was at before I opened the TabBarView.

I’ve tried a few things, with iOSKit, iOSDesignExtensions and the most recent was the ImprovedTabBar example @ Access iOSView Via the Toolbar? which looked promising, where I created a new view to launch the View1 and I still had the navigation bar and a back button, but I still can’t seem to get this to work

I know in Appcelerator all in-code, our tabs are added to a tab group and that tab group is added to a scrollview, which is added to a window, the window has the back button and NavBar visible, and it’s the window that’s launched - if that helps

I did think about just hard linking back to a specific iOSview, but we do open the Invoices-TabBarView from 2 other places.

Our Use case is:
iOSView with Search for Customer which has a listTable of customers found -> Clicking on a TableRow goes to a iOSViewCustomerMenu with various buttons for that Customer, one of which is ListInvoices, this returns all invoices Open in a Table -> On a row Selected opens a TabBarView with 4 tabs for that Invoice,
Tab1=InvoiceDetails Summary of the InvoiceData from Row,
Tab2=InvoiceItems Gets all items charged for in that invoice where we can add more items or edit existing,
Tab3=CalcInvoice, updating invoice Paid, PaymentMethod, PaidDate etc
Tab4=FinishInvoice, used to preview pdf version of invoice, sendToPostalService or EmailInvoice buttons.

At any point in those tabs I want to be able to hit the “Back” button and go back to the View and NavigationStack we was at before and so we can navigate back further

thanks for taking the time to read this and I’m pretty sure that it’s achievable in XOJO, and that it has to be coded, but I’m entirely lost upon where or how to start, any pointers or even solutions would be most appreciated :slight_smile:

You can replace the entire iPhoneScreen (with tabs) to an iPhoneScreen without tabs

https://documentation.xojo.com/api/deprecated/iosapplication.html#iosapplication-currentscreen

App.CurrentScreen.Content = New iOSViewClass

or

App.CurrentScreen.Content = SomeIPhoneOrIpadScreen

Thanks DerkJ, I went through this originally and unfortunately this will not work in my case, as changing from a isoView class to a tabBar screen/class replaces the CurrentScreen.Content and I loose the previous iOSView and navigation hierarchy

I don’t think this can be achieved in Xojo and not even sure iOS as operating system can handle it.

Appcelerator actually faked it by adding the tabs in a scrollablearea, as you described.

In Xojo you could have 4 containers for each different view of the invoices.
The main invoice view wouldn’t have a Tabbar but a toolbar at the bottom with 4 buttons. Tapping any button would swap the invoice container from one to the other.

This way you will keep the navigation hierarchy when pressing the back button.

Edit:
Other solution is using an iOSSegmentedControl (instead of toolbar) to swap the containers. That’s what I do in https://Packr.app

From the view there is:
https://documentation.xojo.com/api/deprecated/iosview.html#iosview-parenttabbar

ParentTabBar … it may have some properties to have it made visible or not ?