"Go" How the data is passed between Apps view in iOS

Source: Internet
Author: User

Data is passed between view in two main categories: direct and indirect delivery. In which indirect delivery can also define a singleton that is used to share data.

"Old solution before IOS5"

1) Using the proxy mode sub-Viewcontroller Design Agent protocol, define the Protocol interface, the parent Viewcontroller implement the Protocol interface, the implementation of the child Viewcontroller exit when the relevant data updated to the parent view.
2) using the message mechanism of iOS, the parent Viewcontroller registers message sub-viewcontroller to send messages, triggering the parent Viewcontroller message processing.
3) Using database as the middle of the storage medium, sub-viewcontroller state data into the DB, the parent Viewcontroller from the DB to get the data update view.
4) Nsdefault storage with iOS
5) The storage of intermediate data is implemented by defining global variables in Appdelegate.

"Go" How the data is passed between Apps view in iOS

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.