Model View Controller (MVC)

Source: Internet
Author: User

MVC is a design pattern. Set ApplicationProgramSeparate input, processing, and output To achieveCodeReuse . For example The iPad and iPhone can share the same M and C, but the V is different. ViewAndModelBetween No Direct communication.

 

OutletAnd view object inNIBComplete the connection in the window.ActionAnd view object events can be found inNIBWindow to complete the connection, if the view object is specified in the ControllerOutletYou can also use the code to bind view object events to user-defined functions.

[Btn1   Addtarget: Self   Action: @ selector (btnpressed :) forcontrolevents: uicontroleventtouchupinside]; -(Void) btnpressed :( ID) sender { Uibutton * BTN = (uibutton *) sender; // Start writing your own actions }  

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.