Introduction To Protocols | Swift Language Basics

  Переглядів 15,796

Kilo Loco

Kilo Loco

6 років тому

Today we go over an introduction to Swift protocols, how they work, and why they are so powerful, using Swift 4. First we go over the general structure of creating a protocol that other objects can conform to. Next, we dive into the different types of members that you might add to your protocol. Lastly, we cover how protocols can be a powerful solution to the problems in your code.
Apple itself has stated that Swift is meant to be a protocol oriented programming language. Once you can grasp the usefulness of Swift protocols, you'll be able to see how they can solve your coding problems and will probably change the way you write your code in general. Lastly, you'll have a full understanding of the composition of a protocol.
Some othe points that get covered are Swift Declare Class Func in Protocol, Why must a protocol operator be implemented as a global function, Is this a correct use of using protocols and delegate pattern in Swift, how to create delegates in swift, Usage of protocols as array types and function parameters in swift.
See what's next on the schedule by checking out my Trello board:
trello.com/b/TNhRZsB2/kilo-lo...
The finished project is available to any students of the free UKposts On my website. Make sure you enroll today:
www.kiloloco.com/p/youtube
If you have any questions or comments about the tutorial, or want to suggest a video to make, feel free to leave a comment below, or reach out to me on Twitter:
/ kilo_loco
If you found this tutorial helpful, make sure to subscribe to the channel for more great tutorials.

КОМЕНТАРІ: 55
@skafaced102
@skafaced102 Рік тому
When he used the dot operator to refer to the first object my mouth dropped. Coming from other languages where you can't do this, this blew my mind.
@richardwalters9249
@richardwalters9249 4 роки тому
I think the reason the “required” label is required for a class initializer ... is because it is possible a subclass can change the initializer in the subclass ... required marks it as “don’t change this “ for subclasses.
@stillwrinkled
@stillwrinkled 4 роки тому
best damn tutorial on Swift Protocol! simple and lucidly explained.
@MrHardyThomas
@MrHardyThomas 4 роки тому
I must say.. this was like a breeze... got the concepts wrapped so easily...
@rylanjevans
@rylanjevans 6 років тому
Thanks Kyle! This was a great start to protocols! I learned something new. Thanks.
@Kilo_Loco
@Kilo_Loco 6 років тому
It’s a really basic concept but I find myself missing bits of knowledge on simple topics all the time. I’m hoping that these in-depth tutorials on the basics help solidify the foundational understand of swift for programmers of all skill ranges
@philipplamenov8649
@philipplamenov8649 2 роки тому
Sick tutorial! Thank you!
@Zerco526
@Zerco526 5 років тому
Been watching your videos all morning. Very helpful if I might say. I recently took on a project at work which involves creating an iOS app for the company. I've never used swift before. (Chose swift because it seems to be leaps and bounds easier than Obj-C) I've been trying to cram about swift for the last two weeks or so, but I've had a hard time finding good UKpostsrs for free tutorials. Except for one other UKpostsr that was helpful with the bare basics of swift, you seem to be the best one I have found. I'm not sure why you don't have more subscribers. Everyone else either flies by info so you can't understand, or you just literally can't understand what they are saying (many with thick accents and speech problems) You speak clearly, and explain just enough so that the lesser intermediate programmer can understand, but you don't dumb it down to the point that only beginners can watch your videos. I just wanted to let you know that I appreciate what you are doing, and I will definitely be watching most if not all of you videos within the next couple weeks to help me on my first iOS project. Keep up the good work my dude. You're changing the world.
@rebeloper
@rebeloper 4 роки тому
Totally agree! Delegation Well explained.
@sudheerthagguparthi8044
@sudheerthagguparthi8044 2 роки тому
Good explanation. Thank you.
@ViaVanille
@ViaVanille 6 років тому
Great video!!! You should make a video on how to use iOS Charts. I cannot seem to find a good source for it and I love your teaching style.
@toastrecon
@toastrecon 5 років тому
Genius. Thanks!
@goatclothes
@goatclothes 11 місяців тому
Thanks Kyle! I am new to learning Swift and was a little confused with protocols but loved how you not only talked through it but showed us. Btw I am looking at leetcode and feel a bit lost after going through a Swift bootcamp course on Udemy. I obviously will need a better grasp of data structures and algorithms but if there is any tips you have please let me know!
@ernestogarcia1573
@ernestogarcia1573 6 років тому
Thanks, gracias!! I’m eager to see the coming new lessons. My benefit, your videos and lessons improve and refine throughout subsequent lessons released release. I seize these lines to the opportunity tHope your efforts reach a fair and deserved return
@Kilo_Loco
@Kilo_Loco 6 років тому
Thanks! Yea I’m trying to increase the production quality, as well as improve my delivery of the content. Hope I’m able to keep providing value.
@mobile_Developers
@mobile_Developers 5 років тому
You have a new subscriber ..Keep it up :)
@laurencewingo9562
@laurencewingo9562 6 років тому
Lol @ "you know damn well this doesn't conform to cryptocurrency"! Love it!
@JoseEduardoChirinosOdio
@JoseEduardoChirinosOdio 2 роки тому
Thanks a lot for this video :)
@mohammadtahir7931
@mohammadtahir7931 6 років тому
Its great stuff! Thanks
@Kilo_Loco
@Kilo_Loco 6 років тому
Glad you like it 😁
@makkah_life_
@makkah_life_ 3 роки тому
Thank you very much
@pravinb777
@pravinb777 6 років тому
keep up thegoodwork👍
@Kilo_Loco
@Kilo_Loco 6 років тому
Thanks. Hopefully it only gets better from here on out
@lwa.dev74
@lwa.dev74 3 роки тому
Great energy on the commentary bro :-)
@slimestoneexpert9804
@slimestoneexpert9804 4 роки тому
Great vid
@hilalalhakani9139
@hilalalhakani9139 6 років тому
great video kilo
@Kilo_Loco
@Kilo_Loco 6 років тому
Thanks 😁
@SaifKmusic
@SaifKmusic 6 років тому
Great video as always! Hey Kyle can you please do a video on how to shard the regular Firebase Realtime database to scale it? I can’t find anything anywhere.
@Kilo_Loco
@Kilo_Loco 6 років тому
I’m not sure I understand what you’re referring to shard? What did you have in mind for scaling?
@SaifKmusic
@SaifKmusic 6 років тому
Kilo Loco Firebase documentation exists but it’s a little confusing without seeing it visually. Check this link out when you get a chance. firebase.google.com/docs/database/usage/sharding
@Kilo_Loco
@Kilo_Loco 6 років тому
Seems like a bit of a process, so I will make sure to include this in the Firebase course that I plan on releasing in the upcoming months
@enaungong
@enaungong 5 років тому
Thanks Kilo!
@Kilo_Loco
@Kilo_Loco 5 років тому
No problem
@wizzards44
@wizzards44 5 років тому
Camera is too close bro! Keep rocking excellent tutorials
@chmziaurrehman
@chmziaurrehman 5 років тому
Good Job 👍🏻👏🏻 🖤
@Kilo_Loco
@Kilo_Loco 5 років тому
Thanks! 😁
@stolenhen
@stolenhen 3 роки тому
I like your video bro! Respect from Russia 🤘🏻🤘🏿
@MrMelomaniak
@MrMelomaniak 2 роки тому
thanks from mauritania
@GG-hk5iz
@GG-hk5iz 6 років тому
Thanks Kilo
@Kilo_Loco
@Kilo_Loco 6 років тому
My pleasure 😇
@Abdi-uy1kh
@Abdi-uy1kh 6 років тому
Thanks
@Kilo_Loco
@Kilo_Loco 6 років тому
Happy to help 😁
@MuhammadAli-zv5vz
@MuhammadAli-zv5vz 6 років тому
nice .swift it is protocol oriented but what is difference between c# interfaces vs swift protocols they are same .then what is protocol oriented programming ??
@Kilo_Loco
@Kilo_Loco 6 років тому
Not sure, I haven’t done C# before so I wouldn’t be able to tell you. Swift is a new language so I’m sure it probably copied things like interfaces from languages like C# and Java.
@aniltodkar6199
@aniltodkar6199 4 роки тому
How to Make Optional Methods in Protocol ? Thank You.
@TheBooban
@TheBooban 2 роки тому
extension myProtocol { func optionalFunc() { print("I can use this func or not" } )
@judehathway7210
@judehathway7210 3 роки тому
3:17 "its like #crypotcurrency up in here!" ahaha
@vasuyarasu6473
@vasuyarasu6473 5 років тому
hey Kilo, I like your videos but I'm new to swift.I want to learn new things.please help me. how to start
@rebeloper
@rebeloper 4 роки тому
You could do 100 days of swift: www.hackingwithswift.com/100 or follow my channel
@wormholewest
@wormholewest 5 років тому
how do you comment everything automatically at 8:32
@Kilo_Loco
@Kilo_Loco 5 років тому
Cmd + / will comment out the current or all selected lines
@cultibotics
@cultibotics 6 років тому
You and Sean Allen should get together!
@Kilo_Loco
@Kilo_Loco 6 років тому
I think this is something we are both interested in and plan collaborating at least once sometime this year. We’re both super busy right now so it’ll be a few months before we can open up that discussion again
@cultibotics
@cultibotics 6 років тому
I'll be looking forward to this!
@ahmetcokicmis6861
@ahmetcokicmis6861 4 роки тому
its been 2 years now and ether price is 170$ lolz
How Do You Write Closures in Swift?
15:55
Lets Build That App
Переглядів 112 тис.
Genial gadget para almacenar y lavar lentes de Let's GLOW
00:26
Let's GLOW! Spanish
Переглядів 35 млн
I Trapped Myself in a Box with Colored Smoke!
00:50
A4
Переглядів 14 млн
Decorator Pattern - Design Patterns (ep 3)
54:35
Christopher Okhravi
Переглядів 468 тис.
What is Event Driven Architecture? (EDA - part 1)
9:29
A Dev' Story
Переглядів 135 тис.
Retain Cycles: How to Detect with Instruments Profiler!
13:55
Lets Build That App
Переглядів 47 тис.
iOS Concurrency and Threading - iOS Interview Question - Swift
7:50
Sean Allen
Переглядів 104 тис.
Build Anything with OpenAI Assistants, Here’s How
12:31
David Ondrej
Переглядів 8 тис.
Swift Programming Tutorial for Beginners (Full Tutorial)
3:22:45
CodeWithChris
Переглядів 7 млн
Protocol Extensions | Swift Language Basics | Swift 4, Xcode 9
14:08