ios – SwiftUI use TabView with Picker

I am attempting to make use of a Picker to vary the chosen tab.

The problem is that after I faucet on the picker, the content material modifications with out animation.

Scrolling between tabs works accurately (the picker animates accordingly).

enter image description here

struct ContentView: View {
@State var tabSelectedValue = 0

var physique: some View {

    VStack {
        Picker("", choice: $tabSelectedValue) {
            Textual content("First").tag(0)
            Textual content("Second").tag(1)
        TabView(choice: $tabSelectedValue) {
            Textual content("Content material for first tab")
            Textual content("Content material for second tab")
        .tabViewStyle(.web page(indexDisplayMode: .by no means))


Leave a Reply