How to create custom models in SwiftUI | Bootcamp #49

แชร์
ฝัง
  • เผยแพร่เมื่อ 1 ธ.ค. 2024

ความคิดเห็น • 45

  • @wad7160
    @wad7160 3 ปีที่แล้ว +37

    Dude, you're the best SwiftUI TH-camr out there and I've seen all of them at this point lol. Plz don't stop!!

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +6

      Haha thanks Wad! I'm trying :)

    • @harshdeepsingh2554
      @harshdeepsingh2554 3 หลายเดือนก่อน

      @@SwiftfulThinkingseriously man, i have been religiously trying to learn and you have the best tutorials. Thanks for sharing this knowledge

  • @quattro805
    @quattro805 2 ปีที่แล้ว +2

    You definitely should add a button "Buy me coffee" under the videos. You really the best SwiftUI tutor on TH-cam

  • @kazz97
    @kazz97 2 ปีที่แล้ว +3

    I don't usually make comments on TH-cam but you are a legend, bro. No cap. You got me watching your entire playlist!

  • @jaimieguzman7084
    @jaimieguzman7084 7 หลายเดือนก่อน

    Found this video after learning on the job for a month and let me just say that you explained this so clearly compared to some devs I'm working with. THANK YOU

  • @cowief
    @cowief 2 ปีที่แล้ว

    Wow! Another sticky point clarified. Nick is the best instructor out there!!!

  • @alexd-xx4yd
    @alexd-xx4yd 2 หลายเดือนก่อน

    Bro this is amazing! Thank you for your work!

  • @SergeiKeyVee
    @SergeiKeyVee 3 ปีที่แล้ว +3

    Awesome! Thanks for the lesson. Almost finished bootcamp)

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว

      😆 Awesome! Thanks for watching Sergei!

  • @francisacemaglalang1701
    @francisacemaglalang1701 ปีที่แล้ว

    Thanks for this Nick! finally I can understand what UUID is for when I watch it on other tutorials.

  • @bbulliard
    @bbulliard 3 ปีที่แล้ว +2

    You are so gifted. You explain things so well. Thank you for this wonderful world class video….bob

  • @coffeeCatPeanutDust
    @coffeeCatPeanutDust 3 ปีที่แล้ว +5

    I feel it's ramping up nicely. I'm really keen to get to a video where user data is saved on refreshing the app

  • @AZMerf
    @AZMerf 3 ปีที่แล้ว +4

    Another great lesson. Thank you.

  • @muhammadusman-vc5re
    @muhammadusman-vc5re ปีที่แล้ว +1

    Thanks, is just a little word for your excellent effort. GOD bless on you

  • @Mhak-rt3lu
    @Mhak-rt3lu ปีที่แล้ว

    thank you, Nick

  • @ojtok79
    @ojtok79 3 ปีที่แล้ว +3

    Great video! Thank you. Hope you’ll cover protocols one day? 😜

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +3

      Hey olcay... definitely! I'm going to do a another series after this Bootcamp with more advanced topics like that :)

  • @giorbismiguel
    @giorbismiguel 2 หลายเดือนก่อน

    Really good video, Thanks

  • @sols.2525
    @sols.2525 3 ปีที่แล้ว +2

    I can't seem to figure out how to change the background color when there is a navigation view and a list.

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +2

      It can be a bit tricky and it's hard to confirm without seeing your code, but you can try (1) adding a .background to the NavigationView, (2) adding a .background to the List or (3) creating a ZStack inside the NavigationView and adding a background layer. Also, the rows in a List had backgrounds of their own, so you'll need to add .listRowBackground on each row individually.

  • @Ivoshevo
    @Ivoshevo 2 ปีที่แล้ว +1

    Nice Explanation: But can you please do a video on how to do an HTTP post request using SwiftUI with Combine?

  • @m__link6499
    @m__link6499 3 ปีที่แล้ว +2

    Thank you again. I haven't finished watching all the videos yet, but I'm wondering how can we manage the data type trhough multiple views, like we do with @State and @Binding 🤔

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +1

      We can move this data the same way we move a String, Bool, or any other data type! I will be doing this in upcoming courses so don't worry if you're still confused.

  • @rasheed1andrew
    @rasheed1andrew 3 ปีที่แล้ว +1

    in the data model, why is the follower count set to a constant and not a variable. I know you barely touched the fpollowercount in the video but I was just wondering if that's how you set it up even though its something that eventually changes.

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +3

      Hey Rasheed! That is a phenomenal question honestly. We are creating what's called an "immutable struct", which means the data inside the struct never changes. If we want to update one of the data points inside the struct, we will actually create a NEW struct, using all the same information except it has a different follower count. I explain this in detail in the next playlist, but if you want to skip ahead, I do it towards the end of this video: th-cam.com/video/nwpmWu1SP1k/w-d-xo.html

    • @rasheed1andrew
      @rasheed1andrew 3 ปีที่แล้ว

      @@SwiftfulThinking would you be open to private lessons?

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +2

      @@rasheed1andrew I am available on Codementor for private lessons and/or help with projects. www.codementor.io/@nicholassarno

  • @Stevesvideoshelf
    @Stevesvideoshelf 3 ปีที่แล้ว +2

    Great video! I'm curious. you used: let id: String = UUID().uuidString I've seen others use: let id = UUID() is there a big difference and are there times when you should use one over the other? Thanks again!

    • @SwiftfulThinking
      @SwiftfulThinking  3 ปีที่แล้ว +6

      Great question. You can use either in SwiftUI and it'll be fine. I recommend the string version because it will be more compatible with backends and other 3rd party services that may not support the UUID Type. Type String is generally supported everywhere, while Type UUID is less common. You can always convert the UUID to a String later on if you prefer.

    • @Stevesvideoshelf
      @Stevesvideoshelf 3 ปีที่แล้ว +2

      @@SwiftfulThinking Ok thanks! Good to know!

  • @bbulliard
    @bbulliard 3 ปีที่แล้ว

    It’s interesting that using a spacer mimics an hstack

  • @radfaredu644
    @radfaredu644 ปีที่แล้ว

    Thank You!

  • @seferzeynalli8188
    @seferzeynalli8188 3 ปีที่แล้ว +1

    perfect

  • @YaroslavSherstyuk
    @YaroslavSherstyuk 3 ปีที่แล้ว +1

    Super

  • @randlyce
    @randlyce 3 ปีที่แล้ว

    amazing

  • @ZhengCheng
    @ZhengCheng 3 ปีที่แล้ว

    Awesome

  • @TahaEnesUzun
    @TahaEnesUzun ปีที่แล้ว

    Aferin

  • @ZhengCheng
    @ZhengCheng 3 ปีที่แล้ว

    Thanks

  • @knowledgeispower4953
    @knowledgeispower4953 10 หลายเดือนก่อน

    Sup ...😇

  • @magedmohmed4403
    @magedmohmed4403 2 ปีที่แล้ว

    Nick Thank you very much , really your tutorial is very very useful for us , Thank you bro 🤎🤎

  • @anciltech
    @anciltech ปีที่แล้ว

    Thanks for another great vid! Anyone know the right way to include this data in @AppStorage? appstorage doesnt allow for the whole struct to be saved, but individual Variables/Constants within. But if a variable is defined optional in the Stuct definition (@AppStorage var x:y?) I run into errors when creating an instance and try to define the variable.

  • @Nunny25
    @Nunny25 3 ปีที่แล้ว +1

    Thanks