NSNotificationCenter vs delegation( using protocols )?

The rule of thumb here is how many clients would like to be notified of an event. If it’s mainly one object (e.g. to dismiss a view or to act upon a button clicked, or to react to a failed download) then you should use the delegate model.

If the event you emit may be of an interest to many objects at once (e.g. screen rotated, memory usage, user login/logout), then you should use the NSNotificationCenter.

Leave a Comment