Protocols and Delegates
suggest changeRemarks
Protocols and Delegates are two related but different concept:
A Protocol is a interface a class can conforms to, meaning that class implements the listed methods.
A Delegate is typically an anonymous object that conforms to a protocol.
The application of Delegate called Delegation is a design pattern.
At one end we have the concept of Inheritance which creates a tight coupling between the subclass and its superclass whereas Delegation design pattern provides an alternative to avoid this tight coupling using which we can create a much looser relationship based on anonymous Delegate objects.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents