'What happens when you apply an idealHeight to a Spacer's frame in SwiftUI?
I'm curious what SwiftUI is doing under the covers when applying an idealHeight to a Spacer's frame. Will the Spacer use the idealHeight as its target height but adjust accordingly based on the room available? It seems to work for my use case but wasn't sure if this is best practice or not.
VStack {
SomeCustomView()
Spacer()
.frame(idealHeight: 100)
AnotherCustomView()
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|