Описание тега objective-c-protocol

Protocols declare methods that can be implemented by any class. They can be used to force the implementation of necessarily used methods to assure the proper execution.

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

Protocols can be made optional specifically, otherwise the implementation is required for compiling successfully.

Developer Documentation for further information and usage