How to create and use protocols - Swift for Complete Beginners

  Переглядів 13,705

Paul Hudson

Paul Hudson

2 роки тому

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.hackingwithswift.com/100/...
Watch the full Swift for Complete Beginners playlist here: • Swift for Complete Beg...

КОМЕНТАРІ: 26
@pmishraofficial
@pmishraofficial 9 місяців тому
This is one of the most detailed and simplified explanation. Thank you for this series!
@BeesBugsJapan
@BeesBugsJapan 2 роки тому
Paul, thanks! I decided to take a stab are swift and your courses and information has been a godsend.
@ESquirez
@ESquirez 2 роки тому
Thank you for this You’ve really help me understand protocols
@xavierrispal9605
@xavierrispal9605 Рік тому
Hello and thanks for this tutorial :) I expected to see some override qualifier for each implementation of a protocol function inside the class...
@user-tq3zn1wm1k
@user-tq3zn1wm1k Рік тому
How nice to see you with a dog!
@timborner6987
@timborner6987 2 роки тому
What a fantastic feature! Also, that's such a cute dog :)
@myrondulay8628
@myrondulay8628 2 роки тому
Thanks Paul. That's one fluffy dog.
@leon.dev89
@leon.dev89 6 місяців тому
Didn’t know Protocols can be so complex 😅
@winterinhead
@winterinhead 10 місяців тому
dog so cute!
@evaanna1298
@evaanna1298 2 роки тому
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 :)
@MeettheStroops
@MeettheStroops 2 роки тому
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.
@MeettheStroops
@MeettheStroops 2 роки тому
I dont think i answered your question. Haha sorry i looked at the comments before watching the video.
@evaanna1298
@evaanna1298 2 роки тому
@@MeettheStroops thank you so much for your reply!
@Wang_dadi
@Wang_dadi 2 роки тому
@@evaanna1298 did you end up understanding why? I have the same question atm... why use "for" and "using" Thanks in advance Eva.
@TheSuperFK
@TheSuperFK 2 роки тому
@@Wang_dadi no clue :) maybe just to show us that two options are possible ?
@prabhakaranlpn1694
@prabhakaranlpn1694 10 місяців тому
nice tutorial...... from India
@ervin9805
@ervin9805 Місяць тому
no
@th9568
@th9568 Рік тому
Paul thank you for this tutorial. What a nice fluffy friend. I was wondering what breed is she?
@twostraws
@twostraws Рік тому
Both my dogs are Samoyeds. They are very white, very fluffy, and very good with my children!
@amandacurtis7245
@amandacurtis7245 Рік тому
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. ❤
@drakonzai
@drakonzai Рік тому
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!
@ilgaralizada7206
@ilgaralizada7206 2 роки тому
Protocol: Doggie))
@Muhammed-wo1nr
@Muhammed-wo1nr Рік тому
can't concentrate with that cute dog interrupting the tutorial
@hamdymubarak3082
@hamdymubarak3082 8 місяців тому
Your dog is so cute. Hello Monster. 🦮
How to use opaque return types - Swift for Complete Beginners
13:42
Paul Hudson
Переглядів 9 тис.
How to create and use closures - Swift for Complete Beginners
18:39
Paul Hudson
Переглядів 22 тис.
In 10 Minutes This Room Will Explode!
10:00
MrBeast
Переглядів 49 млн
How to use Protocols in Swift | Advanced Learning #15
28:37
Swiftful Thinking
Переглядів 14 тис.
How to create your own structs - Swift for Complete Beginners
13:23
Paul Hudson
Переглядів 9 тис.
How to create and use extensions - Swift for Complete Beginners
12:33
Protocol-Oriented Programming in Swift / WWDC15 / Session 408
45:52
WWDC sessions
Переглядів 7 тис.
Understanding Swift Initializers
25:39
Stewart Lynch
Переглядів 4,4 тис.
What is a Protocol in Swift and SwiftUI View protocol | Swift Basics #17
9:47
The Worst Product I've Ever Reviewed... For Now
25:04
Marques Brownlee
Переглядів 7 млн
All New Atlas | Boston Dynamics
0:40
Boston Dynamics
Переглядів 5 млн
Как установить Windows 10/11?
0:56
Construct PC
Переглядів 582 тис.
🤯Самая КРУТАЯ Функция #shorts
0:58
YOLODROID
Переглядів 1 млн
The PA042 SAMSUNG S24 Ultra phone cage turns your phone into a pro camera!
0:24
МОЙ ПЕРВЫЙ ТЕЛЕФОН - Sony Erricson T280i
18:02
ЗЕ МАККЕРС
Переглядів 55 тис.