WHAT IS DELEGATE PATTERN IN IOS?

Glen Martin

Total Post:4

Points:20
Posted by  Glen Martin
 562  View(s)
Ratings:
Rate this:
  1. Glen Martin

    Post:4

    Points:20
    What is delegate pattern in iOS?

    Delegation is a mechanism by which a host object embeds a weak reference (weak in the sense that it’s a simple pointer reference, unretained) to another object—its delegate—and periodically sends messages to the delegate when it requires its input for a task. The host object is generally an “off-the-shelf” framework object (such as an NSWindow or NSXMLParserobject) that is seeking to accomplish something, but can only do so in a generic fashion. The delegate, which is almost always an instance of a custom class, acts in coordination with the host object, supplying program-specific behavior at certain points in the task. Thus delegation makes it possible to modify or extend the behavior of another object without the need for subclassing.Refer: delegate pattern.

Answer

NEWSLETTER

Enter your email address here always to be updated. We promise not to spam!