IOS development Basics

Source: Internet
Author: User
1. How is an application started?When we create an application based on the xcode template, most of the environment parameters when the application starts will be set automatically. For example, xcode creates an Application Object (In addition, it will do other things ), the Application Object establishes a running loop (running loop registers the Input Source and passes the input event to your application ). Most of the tasks are UIApplicationMain. This function is provided by the UIKit framework and automatically called in the main. m source file of the project. The UIkit framework provides all the classes for an application to build and manage its user interfaces (start and end the application, control the interface and contact events ). UIkit is one of the many object-oriented frameworks provided by Cocoa Touch. Cocoa Touch is the development environment for all IOS applications. Call UIApplicationMain to create an instance of the UIApplication class and an instance of the application proxy class, and scan info. plist to obtain information about the application. The main task of the application proxy is to provide a window for displaying the application content. Before the application is displayed, the application proxy also executes some configuration tasks. The following statements are available in all applications:
@autoreleasepool {
   return UIApplicationMain(argc, argv, nil, NSStringFromClass([HelloWorldAppDelegate class]));
}
Some preparations before the application starts are completed in UIApplication. 2 ARC@ Autoreleasepool supports automatic reference to the counting system. ARC provides automatic object lifecycle management for your applications to ensure that objects exist during use and are destroyed when no one is using them. 3 windowThe window provides a container for visual APP content to help send events to application objects. The window itself is invisible.

A window is an interface between a user and an application. You must add a subview of the window to any displayed content.4 StoryboardStoryboard is an archive file that records the objects, transformations, and connections defined by an application user interface. When an application is started, the storyboard file is loaded and the initial view controller is instantiated Based on the file content. A storyboard contains a series of scenarios and segues. A scenario represents a View Controller. A segue represents the conversion between two scenarios.5 View ControllerIs an object that manages a display area. Different views are displayed based on different conditions. The View Controller itself is not a display object.6 viewsAn object that draws some content in a rectangle of the screen and processes user touch events. A view can also contain other views. The included view is called a subview.7. MVC (Model-View-Controller)Model Objects represent data, such as a shape in a drawing program and a role in a game. The View object knows how to display the data represented by the model object. Controller mediation model and view: for example, which view is used to display a data.8. When do I need an output port?If you need to change the properties of a control during the running process, you need to create an output port for it. The output port is actually a pointer to a control object.9. How do I create output ports and actions?Press and hold Control, select an element on the canvas, and then hold down the left mouse button and drag it to the appropriate source file, as shown in. Pay attention to the mode marked in orange circles.

Official Website: https://developer.apple.com/library/ios/#referencelibrary/GettingStarted/RoadMapiOS/Introduction/Introduction.html
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.