Is there a way to set tabbar index by code and/or retrieve screen from tabbar index
I have a tabbar with two tabs mainScreen and otherScreen
In other screen I have two buttons to navigate from otherScreen to mainScreen (with different option defined in otherScreen)
How can I navigate from otherScreen to mainScreen by code ?
Jeremie_L
(Jeremie_L)
April 21, 2023, 9:40am
2
Jeremie_L:
GetTabPageXC
TabBarExtensionsXC.SetTabPageXC(0, true)
Works fine
But I can’t get a reference to the screen at index 0. I need this reference to call a method and pass parameters
For now I store my parameter in App and try to check it on Activated event handler on mainscreen
Jeremie_L
(Jeremie_L)
April 21, 2023, 10:29am
4
I personally don’t like keeping references to other MobileScreens.
You might find it useful to take a look at the Notification_Center module of iOSKit
It allows communication between classes.
1 Like
Jeremie_L
(Jeremie_L)
April 21, 2023, 12:34pm
5
By the way, the Notification_Center module of iOSKit is one of the only modules that is independent.
You don’t need to copy the entire iOSKit to your project for it to work.
2 Likes