Introduction To Protocols | Swift Language Basics

preview_player
Показать описание
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:

The finished project is available to any students of the free YouTube On my website. Make sure you enroll today:

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:

If you found this tutorial helpful, make sure to subscribe to the channel for more great tutorials.
Рекомендации по теме
Комментарии
Автор

I must say.. this was like a breeze... got the concepts wrapped so easily...

MrHardyThomas
Автор

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.

skafaced
Автор

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 Youtubers for free tutorials. Except for one other Youtuber 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.

Zerco
Автор

best damn tutorial on Swift Protocol! simple and lucidly explained.

stillwrinkled
Автор

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!

goatclothes
Автор

Thanks Kyle! This was a great start to protocols! I learned something new. Thanks.

rylanjevans
Автор

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.

richardwalters
Автор

Great energy on the commentary bro :-)

lwa.dev
Автор

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.

ViaVanille
Автор

I like your video bro! Respect from Russia 🤘🏻🤘🏿

stolenhen
Автор

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

ernestogarcia
Автор

Lol @ "you know damn well this doesn't conform to cryptocurrency"! Love it!

ClimbingMeko
Автор

3:17 "its like #crypotcurrency up in here!" ahaha

Tomgush
Автор

You have a new subscriber ..Keep it up :)

Mobile_Architect
Автор

Camera is too close bro! Keep rocking excellent tutorials

wizzards
Автор

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.

SaifKmusic
Автор

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 ??

MuhammadAli-zvvz
Автор

how do you comment everything automatically at 8:32

wormholewest
Автор

How to Make Optional Methods in Protocol ?
Thank You.

aniltodkar
Автор

hey Kilo, I like your videos but I'm new to swift.I want to learn new things.please help me. how to start

vasuyarasu
join shbcf.ru