Closed KirlosYousef closed 1 year ago
Just add the Below code(In my case selected tab is 2)
override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) self.tabBarController?.selectedIndex = 2 }
Hi @KirlosYousef, you can use SSTabConfiguration()
to set selected tab while using SwiftUI. Refer to the example given below:
let tabBarView = SwiftUITabBarController(tabItems: [vc1, vc2, vc3, vc4, vc5], configuration: .constant(SSTabConfiguration(selectedIndex = 1)), isTabBarHidden: self.$isTabBarHidden)
Thank you for reaching us out, hope this helps 😊.
@KirlosYousef Functionality is available in the latest release version 2.0.7.
Hello,
I have been trying to set the default chosen tab view when the app starts but it's not working, Could you please tell me how can I do that? I am using SwiftUI
Thank you.