Controller data transmission and controller Data Transmission

Source: Internet
Author: User

Controller data transmission and controller Data Transmission
Controller Data Transmission
There are two main data transmission situations between controllers: downstream and reverse transmission.
1. Shun Chuan
Controller jump direction: A --> C
Data Transmission Direction: A --> C
Data transmission method: Get destinationViewController, that is, controller C, in the prepareforseue: sender: Method of A, based on the seue parameter, and pass data directly to Controller C.
(To obtain data in the viewDidLoad method of C, assign a value to the UI control on the Interface)
2. Reverse Transmission
Controller jump direction: A --> C
Data Transmission Direction: C -->
Data transmission method: let A become the proxy of C, call the proxy method of A in C, and pass data to A through the parameters of the proxy method

The target controller transmits data to the source Controller called inverse transmission. First, the source controller must have an attribute or method to accept the data transmitted by the target controller. Then, the source controller directly calls this method or assigns a value to the attribute. Then, the target controller must have a source controller that allows the source controller in the target controller to call methods or attributes.

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.