views:

203

answers:

1

Hi i am new to iphone developement , can any one explain me , why setDelegate is used, where we should use it.

[request setDelegate:sender];

thanks in advance.

+2  A: 

Delegates are simply a design pattern; there is no special syntax or language support.

A delegate is just an object that another object sends messages to when certain things happen, so that the delegate can handle application-specific details the original object wasn't designed for. It's a way of customizing behavior without subclassing.

Malek