Hello guys!
I find a weird bug when using Toggle
.
I made a lot tests and the simplified code below:
struct ContentView: View {
@State var toggle = false
var body: some View {
VStack {
Toggle(isOn: $toggle) {
Text("Toggle")
}
Text("Test")
}
.cornerRadius(10)
}
}
I don't know whether you'll reproduce this bug, the code above will make the toggle become invalid.
If I delete the cornerRadius
or Text("Test")
below Toggle
, the toggle will works again.