How to create and use protocols - Swift for Complete Beginners
HTML-код
- Опубликовано: 13 окт 2024
- Other videos in the Protocols and Extensions section:
1. How to create and use protocols: This video
2. How to use opaque return types: • How to use opaque retu...
3. How to create and use extensions: • How to create and use ...
4. How to create and use protocol extensions: • How to create and use ...
5. How to get the most from protocol extensions: • How to get the most fr...
6. Summary: Protocols and extensions: • Summary: Protocols and...
7. Checkpoint 8: • Checkpoint 8 - Swift f...
You can find the full set of videos, along with transcriptions, challenges, tests, and more, in my free 100 Days of SwiftUI course: www.hackingwit...
Watch the full Swift for Complete Beginners playlist here: • Swift for Complete Beg...
I've always been confused by how protocols work. The way you've explained it like I was 5 was perfect! It's literally just a bare requirement for structs, and it allows for custom types for richer inference. Thank you!
This is one of the most detailed and simplified explanation. Thank you for this series!
Paul, thanks! I decided to take a stab are swift and your courses and information has been a godsend.
Thank you for this
You’ve really help me understand protocols
How nice to see you with a dog!
What a fantastic feature! Also, that's such a cute dog :)
Thanks Paul. That's one fluffy dog.
Hello and thanks for this tutorial :)
I expected to see some override qualifier for each implementation of a protocol function inside the class...
Hey! I have a question. Why do we give the estimateTime function parameter (for distance: Int), but function travel gets only (distance: Int), without "for" ? thank you :)
Im still new to this too but "for" is an external parameter name that you will use when calling the func and "distance" is an internal parameter name that you will use within the function. Another example of this would be using an "_" as a external parameter name. estimateTime(_ distance: Int) The "_" is placed in the external parameter name and allows you to omit it. So when calling the func you only need the value. estimateTime(12). All of this is to make the code more legible to anyone looking at it.
I dont think i answered your question. Haha sorry i looked at the comments before watching the video.
@@MeettheStroops thank you so much for your reply!
@@evaanna1298 did you end up understanding why? I have the same question atm... why use "for" and "using"
Thanks in advance Eva.
@@Wang_dadi no clue :) maybe just to show us that two options are possible ?
dog so cute!
Paul thank you for this tutorial. What a nice fluffy friend. I was wondering what breed is she?
Both my dogs are Samoyeds. They are very white, very fluffy, and very good with my children!
Love Samoyeds! I was bobbing between that and american Eskimo but the dog looked too big for that breed so I was leaning Samoyed. 😊
Thank you so much for this clear explanation of protocols! I will be checking out more videos on your channel. ❤
Didn’t know Protocols can be so complex 😅
nice tutorial......
from India
no
HAHA I audibly chortled when you said "if you're in one of the handful of countries that like miles" 3:50
great video too!
Protocol: Doggie))
can't concentrate with that cute dog interrupting the tutorial
Your dog is so cute. Hello Monster. 🦮