My big project started throwing errors:
Type 'ToggleStyle' has no member 'switch'
Made new test project:
struct ContentView: View {
@State var isOn = false
var body: some View {
Text("Hello, world!")
.padding()
Toggle(isOn: $isOn) {
Text("IPv6")
}
.toggleStyle(.switch)
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}
Throws the same error:
Type 'ToggleStyle' has no member 'switch'
what's wrong with this code ?
3
0
681