← Home

Swift 5.9: Parameter Packs and SwiftUI's 10-subview limit

Because Swift didn’t support variadic generics, a SwiftUI view could hold at most 10 subviews. This was a long-standing limitation.

With Swift 5.9 and Xcode 15 there’s a new way for variadic generics: Value and Type Parameter Packs. Now SwiftUI supports more than 10 subviews. So you no longer need artificial Group wrappers just to bundle views as before.