Why does the following SwiftUI code produce a crash when calling background(Color.white)? (100% reproducible for me)
struct ContentView: View {
var body: some View {
let _ = print("rendering")
background(Color.white)
}
}
I (now) understand this is not the way to set a background color, but the behavior still seems unexpected. The console prints "rendering" ~30 times, then crashes. Shouldn't SwiftUI produce a warning or an error here?
0x185a24fc8 <+8>: stp x28, x27, [sp, #0x90]
Thread 1: EXC_BAD_ACCESS (code=2, address=0x16d037fd0)