Today we go over what protocol optionals are, how to implement them, and some of their drawbacks, using Swift 4. First we go over the general structure of creating protocol optionals since they aren't exactly straight forward. Next, we dive into the implementation of optional protocols and the side effects of not adding specific implementation for properties and methods. Lastly, we go over the problems of exposing the objective c runtime (objc) into your project with protocols.
Occasionally, there are situations where you need to have optional members inside your protocol so your objects can solve the problem you are facing. Knowing how to implement optional protocols can be the solution you're looking for and knowing exactly how to use them can come in handy. Lastly, you should be aware of the limitations an optional protocol member can have on your project
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:
https://trello.com/b/TNhRZsB2/kilo-lo...
The finished project is available to any students of the free YouTube On my website. Make sure you enroll today:
https://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:
https://twitter.com/kilo_loco
If you found this tutorial helpful, make sure to subscribe to the channel for more great tutorials.
Protocol Optionals | Swift Language Basics | Swift 4, Xcode 9 video editing software free | |
| 69 Likes | 69 Dislikes |
| 1,665 views views | 15.6K followers |
| Education | Upload TimePublished on 20 Feb 2018 |
Không có nhận xét nào:
Đăng nhận xét