Objective-c Delegate sample code

0 votes
asked Apr 25, 2013 in Objective C by BasicQuestion (1,355 points)

  i am new to objective  why we need delegate?andalso i need the best samplee code for delegate.

1 Answer

0 votes
answered Apr 25, 2013 by admin (8,135 points)

      Delegation is a design pattern not only used in iOS but many other languages. It enables you to hand values and messages over in your class hierarchy.

sample code for delegate

commented Apr 25, 2013 by anonymous
Cocoa uses protocols to support interprocess communication through Objective-C messages