1. Properties
2. Methods
3. Proxy methods
4.SharedApplication
5.NSUserdefault
6. Pass through a single instance of class
Property This method is very convenient to pass the value, only need to get its pointer, if the re-declaration of a pointer, it is not the original content, not the same pointer, so you need to pass a pointer.
Xxxviewcontroller *document == = value to be passed [Self.navigationcontroller pushviewcontroller:document Animated:yes]; [Document release];
Method pass the value of this as long as the declaration to the class instance variables and methods, the current page value passed.
The agent is suitable for passing values from forward. Detailed reference.
Nsuserdefault This is a dictionary that is often used to store user names and passwords. However, it is possible to overwrite the previous content in multiple passes.
Sharedapplication equivalent to a global variable [uiapplication uisharedapplication].delegete This method has not been used
This is also quite the same as the global variable
[[UIApplication Sharedapplication] delegate];
You can write a macro in Appdelegate:
#define App_delegate ((appdelegate *) [[uiapplication sharedapplication] DELEGATE])
You can use it back.
#import " AppDelegate.h " [App_delegate.window addsubview:xxxxxx]; Fmovieappdelegatedelegate]; [Self.navigationcontroller PushViewController:appDelegate.cinemaViewController Animated:yes];
Several ways to transfer the value of iOS pages