Understanding SwiftUI ViewBuilders
Вставка
- Опубліковано 5 лют 2025
- In this video we are going to be taking a look at the SwiftUI ViewBuilder parameter that lets you construct views from closures.
If you don't know what that means, think of it as your own custom implementation of something like an HStack or a VStack in that you can define how you want the views you provide in the closure are presented.
We will start off with a basic use case and then explore two practical examples including Container Views and a Headsup display view.
If you want to support my work, you can buy me a coffee :)
ko-fi.com/stew...
******* Download my StewartLynch UA-cam Channel Application - Free **********
stewartlynch.g...
Table of Contents:
0:00 Introduction
1:24 The Basics
5:41 Container Views
13:54 Heads Up Display
Starter Project Files:
www.createchsol...
Completed Project:
github.com/Ste...
Other references:
Code Snippets video:
https: • Creating, Using and Sh...
Federico Zanetello's FiveStars blog
fivestars.blog...
Other References:
Stewart Lynch's UA-cam Channel:
/ stewartlynch
Stewart Lynch on Twitter:
/ stewartlynch
CreaTECH Solutions Website:
www.createchso...
Stewart Lynch's GitHub:
github.com/Ste...
I loved how you explained that you could approach these things in different ways. And then, when you explained the benefits of using ViewBuilders, it became very clear when to use them 👍
Thanks Jordi.
This man really knows how to explain thing
This video was very helpful. I was having a block but the simple, clear, explanations in the video broke through.
Great. Glad it helped.
That’s awesome lessons Stewart… thank you
Great concepts and even more on possibilities for arranging SwiftUI modifiers! You are correct Stewart, much can be learned from dish people in the community. And that very much includes you and your videos. Thanks so much for this - it was quite insightful!
Thanks a heap for your help!
Happy to help!
Thank you. This is informative and well paced.
Thanks for that.
Thanks for reminding me about that zIndex👍😊
I never really got ViewBuilders til now. many thanks!!
Glad I could help!
Another great one Stewart. 👍🏼👍🏼👍🏼
Being a beginner to swift I am slowly adding layers to my knowledge and hoping that at some point a foundation starts to settle. This video was very, very informative as I have been following the 100daysofdswiftui course and I am a little bit more familiar with the semantics and langue and also the concepts. But to be honest I haven't encountered a really good lecture or information regarding the inbetween stage that goes between "Pure Beginner" and a video like this one.
Thanks very much for your time in providing this tutorial. I'm now going to check out the rest of your videos. Starting with Snippets.
Merci
Thank you . You are exactly the audience that I try to target in most of my videos.
This was really nice, I did not even think until now to implement HUDs in my apps! very inspiring!
Great explanation and examples! Thank you!
Big fan 🤩🤓. You deserve more followers
Thanks, but as long as those who watch get something out of my videos and comment, I will continue.
Just, wow.
Hopefully a good wow
This is genius!
Really good video
Sir pls create playlist of combine beginners to master
Great Sir !!
Do you have a video on how to get a button to work? I’m trying to make a login page for my app. I want it to go to another View and confirm that you logged in, or it’s an invalid login, so they need to sign up.
Sounds like you are looking for this video that I did. SwiftUI Login Screen Workflow
ua-cam.com/video/QrTChgzseVk/v-deo.html
You are amazing!
thanks, learned alot.
Another great video!
nice
Hi. Do you have another video that explains the underscore syntax and why you need that? I find Swift and SwiftUI’s syntactic vocabulary utterly unreadable and overly confusing. I miss the elegance of c++
No video on that topic Zoe. _ is simply used as a placeholder of you do not need the or use the variable or label for the variable. Send me an email and I will try to give you a more detail response.