0

I want to know how I can go from a SwiftUI View into a specific view controller that is part of a tab bar controller. I want to go from a SwiftUI view to a specific index in the UITabBarController which are the UIKit View Controllers. (Let's assume the first index) - Is this possible?

1 Answers1

-1

Because of view hierarchy and how they are loaded, you are going to run into a couple issues if you load a SwiftUI view, then segue to a SwiftUI tab view (Tab Views like to be the parent view) It is possible though!

First, make sure your first view is wrapped in a navigation view. Then when it is time to switch to the tab bar view, either activate a navigation link or make sure the button the user taps is wrapped in a Navigation Link.

ZachtheBoB
  • 398
  • 3
  • 10
  • Hey! Thanks for the reply. - To clarify, the rest of my app is set up using a UITabBarController with UIKit View Controllers linked to it. I want to go from a SwiftUI view to a specific index in the UITabBarController which are the UIKit View Controllers. (Let's assume the first index) - Is this possible? – Andrico Zacharia May 13 '20 at 16:49