まぁ題名の通り。 struct ContentView: View { @State private var selection = 0 var body: some View { VStack(spacing:0) { Picker("画面切替", selection: self.$selection) { Text("A").tag(0) Text("B").tag(1) }.pickerStyle(SegmentedPickerStyle()).padding() if selection == 0 { viewA } else { viewB } } } private var viewA: some View { ZStack { Color(.blue).edgesIgnoringSafeArea(.all) Text("A").foregroundColor(.white)