Http://www.360doc.com/content/14/0410/21/11029609_367858753.shtml
1, the property transfer value before the value.
2. Protocol Transfer value
3, block transfer value instead of the Protocol agent transfer value, the main point of time.
4, simple transfer value data sharing.
5, the notification transfer value
Notification Center
Nsnotificationcenter provides a more decoupled approach. The most typical application is the notification that any object can send notifications to the center, while any object can listen to the center.
The code to send notifications is as follows:
[[Nsnotificationcenterdefaultcenter] postnotificationname:@ "Mynotificationname" object:broadcasterobject];
The code for registering to receive notifications is as follows:
[[Nsnotificationcenterdefaultcenter] Addobserver:listenerobject selector: @selector (receivingmethodonlistener:) name:@ "Mynotificationname" object:nil];
You can specify a specific broadcaster object when registering for a notification, but this is not required. You may have noticed the defaultcenter. In fact, this is the only center you will use in your application. Notifications are open to the entire application, so there is only one center.
There is also a nsdistributednotificationcenter. This is used for communication between applications. There is only one center of that type on the entire computer.
Advantages: The sender and recipient of the notification do not need to know each other. You can specify a specific way to receive notifications. The notification name can be any string.
Disadvantage: More code is needed to observe the key value. You must remove the listener before you delete it. You can't pass a lot of numbers, just let someone do something.