How to use Generics in Swift | Advanced Learning #8

SdĂ­let
VloĆŸit
  • čas pƙidĂĄn 26. 08. 2024
  • This video will introduce you to Generics in Swift. Generics are an extremely powerful part of the Swift language. They allow us to abstract parts of our code, which will help make our code more reusable and efficient. In this video, we'll learn how to use Generics, why we use them, and then review a few simple examples. We will then use Generics in the next few videos in this series to create custom SwiftUI components!
    đŸ€™ WELCOME BACK đŸ€™
    WEBSITE: www.swiftful-t...
    DISCORD: / discord
    GITHUB: github.com/Swi...
    SAY THANKS: www.buymeacoff...

Komentáƙe • 46

  • @philippegden9826
    @philippegden9826 Pƙed 2 lety +25

    You put many self proclaimed Swift / SwiftUI bloggers/vloggers to shame! You deserve many more subs. I’m learning lots - thank you!

    • @SwiftfulThinking
      @SwiftfulThinking  Pƙed 2 lety +2

      đŸ„Č haha I'm just glad you're liking the videos. The channel is slowly growing :) Thanks for the comment.

    • @bradkimbrell2707
      @bradkimbrell2707 Pƙed 2 lety +2

      @@SwiftfulThinking Could not agree more! I am posting on Twitter periodically to let others know. Content is top quality!

  • @kjlee7826
    @kjlee7826 Pƙed 2 lety +6

    Best generics explanation among what I have watched! You are so clear about what you are teaching! Thank you again.

  • @midnightcoder
    @midnightcoder Pƙed 2 lety +1

    I can’t wait to see what is is in the pipes. This is one of the best Swift channels out there. No useless talk, lots of info! Great!

  • @kdtechniquesofficial6153
    @kdtechniquesofficial6153 Pƙed rokem +1

    This is why I call you my SwiftUI Angle. Once I was going through a SwiftUI tutorial by apple that had something to do with a model called "LandmarksModel," and there I saw this . I didn't even understand that by then. But now I do, thanks to you.

  • @franklemur5518
    @franklemur5518 Pƙed rokem +1

    Nick, I find ALL your courses so incredibly useful. I only started Swift in early August and have progressed a lot because of you. I am developing (for my own use - not for public use) an iPhone app of the results of each of your lessons basic thru advanced into an app. This has made me fall down many holes and I am better for it. Keep producing the videos if you have time. Many thanks.

    • @SwiftfulThinking
      @SwiftfulThinking  Pƙed rokem +3

      Thanks for the feedback Frank! I’m glad you enjoyed the playlists... I’ll be returning to CZcams soon 😅

  • @andrejkling3886
    @andrejkling3886 Pƙed 2 lety +3

    Thank you Nick...

  • @seekermel3079
    @seekermel3079 Pƙed rokem

    Really useful video, Nick. I especially like how you started with "CustomType", then moved to the "T" we frequently see in documentation and other code examples. Mystery solved.

  • @ojtok79
    @ojtok79 Pƙed 2 lety +2

    Really fantastic start to explaining generics! Love it! Thank you.

  • @josemanuelortizsanchez4983

    This is the best advanced SwiftUI list I've ever seen. Thanks!

  • @magedmohmed4403
    @magedmohmed4403 Pƙed 10 měsĂ­ci

    Thanks a lot nick , you are perfect in explanation

  • @shadowseekerme
    @shadowseekerme Pƙed 2 lety

    Indeed how beautifully Nicks makes our head Swiftly interpret all that that's interesting, I clap for him also with Generics :)

  • @pasha7324
    @pasha7324 Pƙed 7 měsĂ­ci

    As always, Nick, very valuable :)

  • @maciusessa
    @maciusessa Pƙed 2 lety

    Very, very interesting video! I am looking forward to use those Generics in future projects. Nobody could explain generics to me in such a understandable way. Greetings from Poland!

  • @olhal5617
    @olhal5617 Pƙed 2 lety +2

    Thank you! As always - perfect explanation!

  • @mhmtkrnlk
    @mhmtkrnlk Pƙed 2 lety

    This is perfecto! Best Swift/SwiftUI Course ever i saw and i saw and payed many.

  • @owenpeters8322
    @owenpeters8322 Pƙed 2 lety

    Such good content! Really helping me gain production worthy knowledge! Thank you a ton!

  • @zhanybeksalgarin8918
    @zhanybeksalgarin8918 Pƙed 2 lety

    Great job with explanation brother, thank you!

  • @neneqixia4773
    @neneqixia4773 Pƙed 2 lety +1

    Thanks

  • @tas_araf
    @tas_araf Pƙed 2 lety +1

    Neat tutorial !

  • @tarunreddy3599
    @tarunreddy3599 Pƙed 2 lety

    let nick: Goat

  • @TheseEyesSeeDarknessClearly7

    Is there a difference in creating the Generic View as
    struct GenericView : View
    and
    struct GenericView: View where T: View
    I used the second method and it appears to work the same. Just wondering if there might be some big difference I should know about.

  • @cinquain0
    @cinquain0 Pƙed 2 lety +1

    Good job Nick

  • @hemakirthijayasinghe3039
    @hemakirthijayasinghe3039 Pƙed 2 lety

    really helpful!! Thanks you so much

  • @ostanjaffcompany173
    @ostanjaffcompany173 Pƙed 2 lety

    Thanks a lot for this great tutorial.

  • @eronas8794
    @eronas8794 Pƙed 2 lety

    you are awesome

  • @SwiftDeveloperWorld
    @SwiftDeveloperWorld Pƙed rokem

    how we can understand the type of generic? for example if it is bool use this method or if it is int use the other one

  • @krakatoor
    @krakatoor Pƙed 2 lety

    Super, as usual!

  • @brucknerdevilliers
    @brucknerdevilliers Pƙed 2 lety

    Great, but some confusion between my three brain cells. I'll have to review again.

  • @emdutt4012
    @emdutt4012 Pƙed rokem

    AnyType instead of T..

  • @hashcat5721
    @hashcat5721 Pƙed rokem

    10: 16 It is better to say that it violates one of the SOLID principles.

  • @abdulr6511
    @abdulr6511 Pƙed 2 lety

    Thanks