Understanding SwiftUI ViewBuilders

preview_player
Показать описание
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 :)

******** Download my StewartLynch YouTube Channel Application - Free ***********

Table of Contents:
0:00 Introduction
1:24 The Basics
5:41 Container Views
13:54 Heads Up Display

Starter Project Files:

Completed Project:

Other references:
Code Snippets video:

Federico Zanetello's FiveStars blog

Other References:
Stewart Lynch's YouTube Channel:
Stewart Lynch on Twitter:
CreaTECH Solutions Website:
Stewart Lynch's GitHub:
Рекомендации по теме
Комментарии
Автор

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 👍

jordibruin
Автор

This man really knows how to explain thing

leonciocastillo
Автор

This video was very helpful. I was having a block but the simple, clear, explanations in the video broke through.

billbaze
Автор

Thank you. This is informative and well paced.

srzurka
Автор

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!

KimbrellBrad
Автор

That’s awesome lessons Stewart… thank you

Mahadev-xu
Автор

I never really got ViewBuilders til now. many thanks!!

jamesallison
Автор

Thanks for reminding me about that zIndex👍😊

g-
Автор

Great explanation and examples! Thank you!

crazyfox
Автор

This was really nice, I did not even think until now to implement HUDs in my apps! very inspiring!

multitudes
Автор

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

escoffierdesign
Автор

Big fan 🤩🤓. You deserve more followers

ArchAid
Автор

Sir pls create playlist of combine beginners to master

Prashant-
Автор

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.

LoriWolfcat
Автор

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++

ZoeSummersA