Showing posts with label Delegate Protocol. Show all posts
Showing posts with label Delegate Protocol. Show all posts

Monday, September 10, 2012

Defining a delegate protocol for a custom class and implementing it in Objective-C


Delegate is a protocol by which an object sends message to another object when an event is about to occur or has occurred. It is a way by which an implemented object callbacks an implementing object. To make it simple,  delegate enables number of objects to communicate with each other thus make coding more efficient. This simple post will show you an example how to define a delegate protocol and implement it.