How to use Spacer in SwiftUI | Bootcamp #12

Поділитися
Вставка
  • Опубліковано 22 сер 2024

КОМЕНТАРІ • 32

  • @ClintonSiegel
    @ClintonSiegel 2 роки тому +11

    Love when you add a 'real world' example. Thank you!

  • @andresraigoza2082
    @andresraigoza2082 2 роки тому +9

    Great idea to explain this with colors. I didn't even know we could add color to a spacer(). That makes it so clear. Thank you so much!

  • @yuchen3587
    @yuchen3587 2 роки тому +6

    I have followed the SwiftUI official tutorial and still have no idea about how to write my own SwiftUI code. Your tutorials are much better than that!

    • @ubuandeyelbme
      @ubuandeyelbme 6 місяців тому

      Landmarks? I was sooooo lost.

  • @fre.helfer
    @fre.helfer Рік тому +1

    I thought I wouldn't learn anything in this video, because I already know spacer.
    I just figured out why my views were getting out of the small device screen!
    THANKS!

  • @dr.craigcurphey4829
    @dr.craigcurphey4829 3 роки тому +4

    Love the music, too!

  • @ZhengCheng
    @ZhengCheng 3 роки тому +9

    What a great series!

  • @ConfidentlyRong-jo5yt
    @ConfidentlyRong-jo5yt 2 місяці тому

    So happy I started this series. Thanks for this!

  • @Zaybeeh
    @Zaybeeh 6 місяців тому

    Honeslty amazing job explaining this. It's not complicated at all but I wonder how much harder it would've been if you didnt explain it wth colors and all. Great Videos and series

  • @magedmohmed4403
    @magedmohmed4403 Рік тому +1

    Thanks Nick , your explanation is very very helpful for me or for us

  • @Abe-fb2lj
    @Abe-fb2lj 2 роки тому +1

    Appreciate your hard work!! Thank you soooooo much!

  • @ubuandeyelbme
    @ubuandeyelbme 6 місяців тому

    Cleverly done 😁

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

    Thank u bro...☺

  • @user-ev3dl9zt8s
    @user-ev3dl9zt8s 3 роки тому +1

    Thank you!!!

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

    Really clear

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

    Thank you!

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

    wow start

  • @DmitriyChurilov
    @DmitriyChurilov 6 місяців тому

    Hi Nick. Your tutorials are super useful.
    Though I have an issue with an images hstack. It also occupies the safe area of the screen. Any suggestions on that point?
    Thank's again 👍🏼

    • @SwiftfulThinking
      @SwiftfulThinking  6 місяців тому +1

      Try adding .clipped or a corner radius to the images. Otherwise someone in our discord could give u specific code help: discord.gg/hh7rx8Wbhn

  • @yuchen3587
    @yuchen3587 2 роки тому +1

    Could you please do a tutorial series on how to use SwiftUI on Apple Watch?

  • @Guinhulol
    @Guinhulol Рік тому +1

    Oh, It all makes since now, spacer will straight dynamic just like Padding did, right?

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

    NICE

  • @sermilion_audio
    @sermilion_audio 2 роки тому +1

    Thanks for the video. If I have created one Spacer with min length 0 and I do not want to redeclare it every time, is it OK to assign it to a var and just reuse it? `var spacer = Spacer(minLength: 0)` and just reuse that var? I tried it and it works fine, just wanted to know if this is a bad practice and I should create new instances every time. Thanks.

    • @SwiftfulThinking
      @SwiftfulThinking  2 роки тому +1

      Hey Sermilion! I think it's a great idea to create a variable. When you upload your app and it compiles, it won't make a difference which method you use. Therefore, I recommend using whichever method is going to make your code look cleaner, more readable, and more scaleable (reusable).

  • @PassTheBoof
    @PassTheBoof Місяць тому

    FYI if you name your file spacer, then it will crash when you try to use a spacer

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

    at time ~13min, is that a reason to set Spacer frame width to 10, when spacer pushes vertically?

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

    Fantastic info. Is there a simple way to center an image in the middle of a view, then have text to the left of the button using spacers and stacks. I ended up using a geometry reader but is seems like over kill for this simple layout.

  • @panzorax.
    @panzorax. 4 місяці тому

    I've question for you, in swiftui does it have space evenly like Flutter?
    ou know what i mean say?

  • @ZhengCheng
    @ZhengCheng 3 роки тому +2

    Spacer(minLength: 0)

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

    Hey Nick, great series. How do I get in touch with you ?