hit counter

Timeline

My development logbook

Objective-c: Notification

NSNotificationCenter

NSNotification

addObserver:selector:name:object

Objects that have registered with the notification center are responsible for removing themselves when they no longer wish to receive notifications or when being destroyed. It is particularly important to remove an observer object in the object’s dealloc method, since the notification center does not retain observers. If you do not remove objects before they are destroyed, the notification center will attempt to send messages to objects that no longer exist, resulting in a runtime exception