This course is available as part of the Professional subscription. To learn more click here

Advanced Swift: Protocol Oriented Programming

Mar 26 2019 · Video Course (21 mins) · Advanced

Swift protocol oriented programming gives you the power of object oriented programming with better composability and without the baggage of class inheritance.


  • Swift 4, iOS 12, Xcode 10


1:03 Free

Let's review what you'll be learning in this course on protocol oriented programming in Swift, and why it's important.


Let's learn about how Swift gives you the ability to build polymorphic class types with different levels of dynamism.


Swift protocols can be used to provide customization points with default implementations in extensions.


Convert object oriented code to protocol oriented code and observe the key differences between the two.


In this video you'll see how protocols and retroactive modeling can be used as a tool for unifying types.


In this challenge, try using retroactive modeling to compute the bounding boxes for different shapes.




Protocol oriented thinking is nothing new but Swift provides a unique way to achieve reuse without requiring a specific data layout.


Next course in this Learning Path

Version history

iOS 12, Swift 4, Xcode 10 (Selected)

Mar 26 2019

iOS 10, Swift 3, Xcode 8

May 9 2017

Who is this for?

This course is for developers interested in getting a deeper understanding of the Swift language. It expects you to be comfortable with the basic syntax of Swift and to have perhaps written an app or two. You should be familiar with basic types in the Swift standard library.

Covered concepts

This course focuses on:

  • Protocol oriented programming
  • Class dispatch
  • Protocol dispatch
  • Retroactive modeling