Delegation in Objective C

A delegation in Objective C is simply an object that we assign to the delegate property of another object.

Delegation in Objective C in practice

Delegation in iOS

Once you have created a protocol (or if you are using an existing protocol), you can use that protocol as an implementation of the delegate methods. Make sure the class you want to implement the delegate is properly including that delegation.

//  Delegate in Objective C

@interface SomeClass<SomeDelegate>

@end

Summary

Protocols and delegations are an important architecture pattern in iOS. This article covered the basics of how to use a protocol to delegate some tasks from one object to another one.

Interested in learning more in-depth concepts?

If you are interested in learning more about mobile app development, I invite you to join my complete iPhone or Android course(s):

Leave a Comment