What are protocols in Swift?

Updated May 17, 2026

Short answer

Protocols define a blueprint of methods and properties.

Deep explanation

They enable protocol-oriented programming, a key Swift paradigm.

Real-world example

Used in delegation patterns like UITableViewDelegate.

Common mistakes

  • Confusing protocols with classes.

Follow-up questions

  • What is protocol inheritance?
  • What is protocol composition?

More Swift interview questions

View all →