u/pitt500in r/swift • Recommends
What I learned at #WWDC21 watching "Demystify SwiftUI"? by @swiftandtips
#swiftui#viewbuilder#opaque-types
13K subscribers • 12 videos on Hallway
Intermediate. Assumes working knowledge.
1.5K views5 years ago1 recommendation
Mobile developmentProgramming languagesSwiftiOS and SwiftUIVue, Svelte, Angular and others
Pedro Rojas explains how SwiftUI's ViewBuilder handles returning multiple views under the hood using Swift's opaque types.
Hello guys, Welcome to another video! I wanted to share a quick video about what I learned this week at #WWDC21. We will answer why we can return "multiple" views using ViewBuilder since opaque types cannot allow you to do that. Is it just magic? ... actually no, let's find out 😉! ------ Resources: * Demystify SwiftUI: developer.apple.com/videos/play/wwdc2021/10022/ * Opaque types: youtu.be/C4WQFU7QrmM * ViewBuilder: youtu.be/II4xKNjalTE ------ Other videos in the channel: * State management in SwiftUI: youtube.com/playlist?list=PLHWvYoDHvsOWcOjBdPoMGCvX_7X9U14Qo * UIKit in SwiftUI: youtube.com/playlist?list=PLHWvYoDHvsOX8vB95YIkv_r5e5IXWcyu2 * Generics: youtube.com/playlist?list=PLHWvYoDHvsOVP-9UvMBBYJCqxrJ3E8Cry * The power of Combine: youtu.be/IJinuMLaERE * Never type in Swift & SwiftUI: youtu.be/RHgRq4_gdk8 ----- 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 LumaFusionWhat people say. Recommended as a clear explanation of the underlying mechanics of SwiftUI's ViewBuilder.
u/pitt500in r/swift • Recommends