Introduction to IOS Program Framework (iphone application architecture and program composition, invocation, etc.)

Source: Internet
Author: User

1. Apple divides the technical aspects of iOS devices into 4 tiers:

Cocoa touch:objective-c Cocoa

Media:c

COre Services:c

Core Os:c


2. The foundation framework is the most basic framework, including functions such as the input and output of collections, strings and files;

The Uikit framework is related to the interface of the iOS device;

There is also a screen touch event included. For example: Tap, hold, swipe, or zoom.


3.Foundation equivalent to the Java core classes;

Uikit is the equivalent of Java swing.


4. The role of the main.m file:

(1) Auto-release pool: Insert retain, release, and autorelease statements at compile time at the appropriate place in the code

• If multi-threading is used, we also need to provide its own auto-free pool for other threads.

(2) Uiapplicationmain () function: Creates an Application object, the fourth parameter specifies the name of the application class and the name of its delegate class, and creates an event loop for the application that continuously accepts the user's interaction.


5. Application delegate: Appdelegate

Its implementation protocol: Uiapplecationdelegate

The first call after instantiation is: Application:didfinishlaunchingwithoptions method: The method first creates a UIWindow window object and then sets the view in which the controller needs to be displayed.

Note: When the application loads the Window object, Appdelegate is relegated to the second tier. Instances of the Uiviewcontroller class are on stage and do their work. Until the end of the application or a memory problem occurs, appdelegate is no longer what it should be.


6. View Controller: Creates a view through the Loadview method and customizes the view through the Viewdidload method.


7.IOS applications can access through the NSBundle class: Any audio, video, and data files in the root directory and the custom subfolders.


8. xib file: When we use the storyboard to create the user interface, we can see the connection between the controller of the entire application in one file.



Introduction to IOS Program Framework (iphone application architecture and program composition, invocation, etc.)

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.