Delegation

From CSSEMediaWiki
Revision as of 11:54, 14 September 2009 by Stephen Fitchett (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Delegation is a design pattern which involves an object that delegates certain responsibilities to an associated object called a delegate.

As an example, the Cocoa framework contains a class called NSTableView, which is a user interface control which presents a scrollable list of selectable rows. It can use a delegate for numerous tasks such as to get the height of a row or to provide tool tips for cells.

Personal tools