iphone - What is the purpose of NSNotification?
Can you please explain what is the purpose of the NSNotification, and what are some situations I could use it?
Does a notification call all classes in the app, or does it call a specific class, by passing a delegate?
Is it possible to create 1 notification, and receive it on multiple classes?
Using NSNotification you can notify multiple objects about some event and you can do that not caring about which objects and how many of them are listening for that notification.
NSNotification passes through NSNotificationCenter object that is responsible for getting notifications from objects who create them (using postNotification: functions family) and sending them to the objects who are registered to listen to specific notification (to receive notification object must register in NSNotificationCenter using addObserver: functions)
Notification can be observed by multiple objects - all of them must just register in NSNotificationCenter,