Comment on SwiftUI preview layout: size that fits does not work You can still use the #Preview macro, but .previewLayout will be ignored. Use #Preview("Title", traits: .sizeThatFitsLayout) instead. UI Frameworks SwiftUI Sep ’24