Why does SwiftUI render these two buttons differently?
Trying them one at a time (only 1 button in the body) gives full screen yellow for one and a normal size button for the other.
Test 1
Button("Smh...") {}
.background(.yellow)
.frame(maxWidth: .infinity, maxHeight: .infinity)
Test 2
Button("Smh...") {}
.frame(maxWidth: .infinity, maxHeight: .infinity)
.background(.yellow)
I could guess why order might matter if the chained methods both modified the layout, but it's not obvious how color would cause this.