I have a tabView with several views, and I would like to know how to undefine a default view when loading it. By default, Xcode assigns the first view but I want the second view to be loaded when the application is launched.
var body: some Scene {
WindowGroup {
TabView {
alertView()
todayView()
forecastView()
}
.tabViewStyle(PageTabViewStyle(indexDisplayMode: .always))
.onAppear
{
UIPageControl.appearance().currentPageIndicatorTintColor = .black
UIPageControl.appearance().pageIndicatorTintColor = UIColor.black.withAlphaComponent(0.2)
}
}
}