Making all items in a horizontal scroll view match the tallest card's height? Combine .π‘“π‘Ÿπ‘Žπ‘šπ‘’(π‘šπ‘Žπ‘₯π»π‘’π‘–π‘”β„Žπ‘‘: .𝑖𝑛𝑓𝑖𝑛𝑖𝑑𝑦) with .𝑓𝑖π‘₯𝑒𝑑𝑆𝑖𝑧𝑒(β„Žπ‘œπ‘Ÿπ‘–π‘§π‘œπ‘›π‘‘π‘Žπ‘™: π‘“π‘Žπ‘™π‘ π‘’, π‘£π‘’π‘Ÿπ‘‘π‘–π‘π‘Žπ‘™: π‘‘π‘Ÿπ‘’π‘’) to force the π»π‘†π‘‘π‘Žπ‘π‘˜ to shrink to ideal height.

πŸ”—: https://www.swiftdifferently.com/blog/swiftui/fixedsize-usecase by Omar Elsayed

#SwiftUI #iOSDev #SwiftLayout

Finally found a use case for .fixedSize πŸ˜…

I spent years avoiding .fixedSize because the name sounded like a trap. Then a layout problem showed up that only it could solveβ€”and taught me to stop dismissing APIs based on vibes.

SwiftDifferently