1. Initialize the value of the pass (Shun pass)
Custom initialization methods in the UI, usually when one interface pushes another interface, so if you want to use a custom initialization method, at least in this method to create the object, so this method is not suitable for callbacks.
<1> Custom initialization method, which will need to pass the content as parameters, if you need to pass multiple, set multiple parameters
<2> calling custom initialization methods in the right place
2. Attribute value (pass-through)
<1> Defining public properties
<2> need an object that you can pass a value on
<3> attribute Assignment
3. Single-pass values (both shun and inverse)
The advantage of a singleton is that once created, the rest of the time is used at the same time, so a lot of times the user's information is stored in a singleton, so there is no need to make multiple values, only need to create a single case again on the line
4.AppDelegate Transmit Value
<1> a property of life in Appdelegate
<2> by Appdelegate *app = [[Uiapplocation sharedapplication] delegate]; Save property
<3> by Appdelegate *app = [[Uiapplocation sharedapplication] delegate]; Using properties
5. Notification value (pass-through and reverse-pass)
<1> Create a notification sender
<2> Create a notification recipient
<3> Destruction Notification
6. Proxy value (cis-and inverse-pass) (A&B)
B.h: Establishing an agreement to set proxy properties
B.M: Let agents execute protocols and methods when they need agents to do things. (Note: First judgment to prevent crashes)
a.m.: Set up the agent, abide by the protocol, implement the Proxy method
7.block transmit value (pass and reverse) (Declaration and invocation in B are implemented in a)
<1> names The block and writes the parameters that need to be passed in the parameter list as a formal parameter
<2> Set block Properties (note: With week)
<3> set a method to hold the current block
<4> call in the right place
<5> block calls where the object is created
8.NSUserDefault or File value: (Pass and reverse)
[[Nsuserdefault Standarduserdefault] Objectforkey:];
The inverted pass needs to be in Viewwillappear and viewdidappear.
IOS value-in-pass mode