In order to send a notification, an object sends:
[[NSNotificationCenter defaultCenter] postNotificationName:@"notif_key" object:nil userInfo:userDict];
Now, every living object that listen to a notification named @"notif_key" can do some action.
How do you make an object to listen?
It needs to run:
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(doSomething:) name:@"notif_key" object:nil];
and When the first object will send the notification, the observer object will run 'doSomething:' method.
Notes:
- userDict is a dictionary where you can send some info to those observers.
- Don't forget to cancel the observer in the dealloc method.