IOS page Jump and Data Transmission
IOS page Jump:
First
[Self. navigationController pushViewController: subTableViewController animated: YES];
// Description: Jump to [self. navigationController popViewControllerAnimated: YES] Through NSNavigationBar; // Description: return to the parent view in the subview
Second
UIViewController * control = [[UIViewController alloc] init]; [self presentModalViewController: control animated: YES]; [control release]; // Description: Jump to [self dismissModalViewControllerAnimated through an event: YES]; // Description: return through the event.
Third
[Self. view. window addSubview: otherview]; [self. view removeFromSuperview]
Data transmission:
1) The proxy mode is used for the sub-viewcontroller to design the proxy protocol and define the Protocol interface. The parent viewcontroller implements the Protocol interface to update the relevant data to the parent view when the sub-viewcontroller exits.
2) The parent viewcontroller registers the message sub-viewcontroller to send messages using the message mechanism of ios, which triggers message processing of the parent viewcontroller.
[[Nsicationcenter center defacenter center] addObserver: self selector: @ selector (setData :) name: kNotificationMessage object: nil]; // register the listener, where setData is used to process messages
[[Nsicationcenter center defacenter center] postNotificationName: kNotificationMessage object: self userInfo: infoDict]; // send a message
3) The database is used as the medium for storing data. The sub-viewcontroller saves the status data to the DB, and the parent viewcontroller obtains data from the DB to update the view.
4) use NSDefault storage for ios
5) define global variables in AppDelegate to store intermediate data.