import SwiftUI struct NestedInStack: View { var body: some View { HStack(spacing: 10) { Color.blue .debugOverlay(color: .red, alignment: .bottom, offset: 16) Color.green .debugOverlay(color: .red, alignment: .bottom, offset: 16) Color.yellow .debugOverlay(color: .red, alignment: .bottom, offset: 16) .relativeProposed(width: 0.5) // .layoutPriority(1) } .border(.primary) .debugOverlay("HStack", color: .red, alignment: .bottom, offset: 48) .frame(height: 80) .frame(width: 620) .debugOverlay("available", color: .red, alignment: .bottom, offset: 80) .padding() .padding(.bottom, 100) } } struct NestedInStack_Previews: PreviewProvider { static var previews: some View { NestedInStack() .debugLayout(true) } }