What is delegate pattern in iOS?

Total Post:4

 772  View(s)
Rate this:
  1. Post:4

    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.

      Modified On Mar-28-2018 04:55:01 AM



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