1. Attribute Passing value
The value is passed back to the front.
2. Protocol Transmission value
http://liuyafang.blog.51cto.com/8837978/1549391
3, block transfer value
Instead of the protocol proxy value, the main point in time.
http://liuyafang.blog.51cto.com/8837978/1551399
4, simple interest transmission value
Data sharing.
5. Notification value
http://liuyafang.blog.51cto.com/8837978/1557029
Notification Center
The Nsnotificationcenter provides a more decoupled approach. The most typical application is any object pair that can send notifications to the center, while any object can listen to the notification of the center.
The code to send the notification is as follows:
[[nsnotificationcenter defaultcenter] postnotificationname:@ "Mynotificationname" object:broadcasterObject]; The code for the
register to receive notifications is as follows:
[[Nsnotificationcenter Defaultcenter] 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. This is actually the only center you'll use in your app. Notifications are open to the entire application, so there is only one center.
There is also a nsdistributednotificationcenter. This is used for inter-application communication. There is only one center of that type on the entire computer.
Pros: Both the sender and the recipient of the notification do not need to know each other. You can specify the specific method to receive notifications. The notification name can be any string.
Disadvantage: More code is required to observe the key value. You must remove listeners before deleting them. You cannot pass a large number of values, only let who do what.
This article is from "Xiao Liu _blog" blog, please be sure to keep this source http://liuyafang.blog.51cto.com/8837978/1557031
Summary of IOS value-passing methods