How to use Generics in Swift | Advanced Learning #8
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...
You put many self proclaimed Swift / SwiftUI bloggers/vloggers to shame! You deserve many more subs. Iâm learning lots - thank you!
đ„Č haha I'm just glad you're liking the videos. The channel is slowly growing :) Thanks for the comment.
@@SwiftfulThinking Could not agree more! I am posting on Twitter periodically to let others know. Content is top quality!
Best generics explanation among what I have watched! You are so clear about what you are teaching! Thank you again.
Thanks KJ happy to hear this
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!
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.
KD is back!!
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.
Thanks for the feedback Frank! Iâm glad you enjoyed the playlists... Iâll be returning to CZcams soon đ
Thank you Nick...
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.
Really fantastic start to explaining generics! Love it! Thank you.
Olcay! Thank you :)
This is the best advanced SwiftUI list I've ever seen. Thanks!
Thanks Jose!
Thanks a lot nick , you are perfect in explanation
Indeed how beautifully Nicks makes our head Swiftly interpret all that that's interesting, I clap for him also with Generics :)
As always, Nick, very valuable :)
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!
Thank you! As always - perfect explanation!
This is perfecto! Best Swift/SwiftUI Course ever i saw and i saw and payed many.
Haha thanks Mehmet!
Such good content! Really helping me gain production worthy knowledge! Thank you a ton!
Great job with explanation brother, thank you!
Thanks
đ„łđ„ł
Neat tutorial !
Thanks for watching Tasawar!
let nick: Goat
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.
Good job Nick
Thanks again James
really helpful!! Thanks you so much
Thanks a lot for this great tutorial.
You're welcome !!
you are awesome
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
Super, as usual!
Thank you ĐĐ°ĐŒĐžĐ»Ń!
Great, but some confusion between my three brain cells. I'll have to review again.
Yea this is tough stuff đ
AnyType instead of T..
10: 16 It is better to say that it violates one of the SOLID principles.
Thanks
Thank you Abdul!