Protocols declare methods that can be implemented by any class. Protocols are useful in at least three situations:
To declare methods that others are expected to implement
To declare the interface to an object while concealing its class
To capture similarities among classes that are not hierarchically related
Declaring Interfaces for Others to Implement
Methods for Others to Implement
Declaring Interfaces for Anonymous Objects
Non-Hierarchical Similarities
Formal Protocols
Informal Protocols
Protocol Objects
Adopting a Protocol
Conforming to a Protocol
Type Checking
Protocols Within Protocols
Referring to Other Protocols
Last updated: 2008-02-05