Book Image

Swift: Mastering the Core Concepts

By : Jonathan Crooke
Book Image

Swift: Mastering the Core Concepts

By: Jonathan Crooke

Overview of this book

Swift is a new, general-purpose, multi-paradigm, and compiled programming language developed by Apple Inc. for iOS, macOS, watchOS, tvOS, and Linux. This course introduces you to Swift, and the various ways you can get started on your current platform. In comparison to Objective-C, Swift is a reasonably "large" language, with many native features. This course teaches you the fundamentals of the language and features that will be essential to mastery. Depth is avoided, in favor of introducing the developers to the most common functions or core features. This course begins with an introduction to the Swift language and how to write basic Swift code. You will then build your Swift foundation by learning important concepts such as collection types, generics, protocols, type casting, and type checking. Finally, you will be introduced to closures. By the end of this course, you will be ready to take a step towards attaining mastery of Swift.
Table of Contents (10 chapters)
Chapter 9
Protocols
Content Locked
Section 3
Adopting protocols
Now that we have covered how to define custom protocols, we will see how to adopt protocols. Particularly, we will: - Learn the basic syntax - Explore why to adopt protocols - Understand why to use them and try in Xcode