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

КОМЕНТАРІ • 35

  • @jordibruin
    @jordibruin 3 роки тому +5

    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 👍

  • @leonciocastillo6433
    @leonciocastillo6433 3 роки тому +3

    This man really knows how to explain thing

  • @billbaze1737
    @billbaze1737 2 роки тому

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

  • @Mahadev-x7u
    @Mahadev-x7u 2 роки тому +1

    That’s awesome lessons Stewart… thank you

  • @KimbrellBrad
    @KimbrellBrad 3 роки тому

    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!

  • @stevemcintyre4550
    @stevemcintyre4550 8 місяців тому

    Thanks a heap for your help!

  • @srzurka
    @srzurka 3 роки тому +4

    Thank you. This is informative and well paced.

  • @g-3409
    @g-3409 3 роки тому +3

    Thanks for reminding me about that zIndex👍😊

  • @jamesallison9725
    @jamesallison9725 Рік тому

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

  • @mhfs61
    @mhfs61 3 роки тому +3

    Another great one Stewart. 👍🏼👍🏼👍🏼

  • @escoffierdesign179
    @escoffierdesign179 3 роки тому

    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

    • @StewartLynch
      @StewartLynch  3 роки тому

      Thank you . You are exactly the audience that I try to target in most of my videos.

  • @multitudes389
    @multitudes389 3 роки тому

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

  • @crazyfox1317
    @crazyfox1317 2 роки тому

    Great explanation and examples! Thank you!

  • @ArchAid1
    @ArchAid1 3 роки тому

    Big fan 🤩🤓. You deserve more followers

    • @StewartLynch
      @StewartLynch  3 роки тому +1

      Thanks, but as long as those who watch get something out of my videos and comment, I will continue.

  • @KK-pq6lu
    @KK-pq6lu 3 роки тому +1

    Just, wow.

  • @ProgramJerol
    @ProgramJerol 7 місяців тому

    This is genius!

  • @WattsnabbAB
    @WattsnabbAB 8 місяців тому

    Really good video

  • @Prashant-7
    @Prashant-7 3 роки тому +2

    Sir pls create playlist of combine beginners to master

  • @rahuljamba5846
    @rahuljamba5846 2 роки тому

    Great Sir !!

  • @LoriWolfcat
    @LoriWolfcat 2 роки тому

    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.

    • @StewartLynch
      @StewartLynch  2 роки тому

      Sounds like you are looking for this video that I did. SwiftUI Login Screen Workflow
      ua-cam.com/video/QrTChgzseVk/v-deo.html

  • @hiosdev
    @hiosdev 2 роки тому

    You are amazing!

  • @imalkamuthukumara6343
    @imalkamuthukumara6343 3 роки тому

    thanks, learned alot.

  • @FloWritesCode
    @FloWritesCode 3 роки тому

    Another great video!

  • @victorriurean
    @victorriurean 2 роки тому

    nice

  • @ZoeSummers1701A
    @ZoeSummers1701A Рік тому

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

    • @StewartLynch
      @StewartLynch  Рік тому

      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.