Skip to content
0:00 / 0:00

#swiftui#viewbuilder#resultbuilders

Why do SwiftUI's Stacks have a max limit of subviews? (and how to fix it!)

Swift and Tips

13K subscribers • 12 videos on Hallway

YouTube
  • Recommended by 1 person: 1 in engineering communities.
  • Presented by Pedro Rojas

Intermediate. Assumes working knowledge.

1.6K views4 years ago1 recommendation

Mobile developmentSwiftiOS and SwiftUI

Pedro Rojas explains why SwiftUI stacks are limited to ten subviews due to ViewBuilder and how to bypass this limit.

In this video, you will understand why SwiftUI's stacks can accept at most 10 subviews per stack, and also how to avoid this issue forever! ------ Resources: * Result Builders: developer.apple.com/videos/play/wwdc2021/10253/ * ViewBuilder: youtu.be/II4xKNjalTE * Protocols with associated types: youtu.be/pp4hKZBBci4 ------ Other videos in the channel: * A mini-game with collisions in SwiftUI: youtu.be/ylcEQHYev1U * Why can't you use Int indices in a String?: youtu.be/k35T7E1hxeQ * Gestures and Animations: youtube.com/playlist?list=PLHWvYoDHvsOXZH7A7S06P0MIaeLis7CVe * GeometryReader and apple Watch animations: youtu.be/ma4LP8RnyI0 * What's new in SwiftUI 3.0: youtu.be/ewIeL1Trd5o * Swift Concurrency: youtube.com/playlist?list=PLHWvYoDHvsOUsGazZVW_ZdehusA0diIxs ----- Don't forget to subscribe to the channel, like it, and follow me on social media: Twitter: twitter.com/swiftandtips twitter.com/pitt500 Finally, ask me for a video you would like to see next 😄! Credits: - Music by Wataboi from pixabay.com/ - Video edited with Final Cut Pro

Why it's here

1 person recommends this

u/pitt500in r/swift • Recommends

Why do SwiftUI's Stacks have a max limit of subviews? (and how to fix it!)