Chapter 1 of basic iOS tutorials

Source: Internet
Author: User

Target

Introduction to the IOS platform

Developer Program

Basic knowledge of IOS development

Complete a Hello World

1. Introduction to the IOS platform

History

(1) Evolution from Mac OS

(2) Based on Darwin

System Level

(1) core operating system layer

(2) core service layer

(3) media layer

(4) Cocoa interface service layer

Common Operations

(1) swiping)

(2) tapping)

(3) pinching)

(4) reverse pinching)

CocoaTouch

(1) Tailored from Mac OS X framework

(2) graphical and event-driven applications can be built

(3) generate small code

(4) have the same appearance as Apple's program Style

 

What is SDK

Software Development Kit

Including: interface, code, framework, compilation, analysis, and other tools

Common Tools

(1) Xcode

(2) Interface Builder

(3) Simulator

(4) Instruments

 

 

2. Developer Program

(1) Online developers

You can only run the program on the simulator, but cannot deploy the program to the device.

(2) Standard developers

Get the permission to publish 100 devices

Application Submission to App Store

$99 for individual developers

(3) Enterprise developers

$299, suitable for large companies with more than 500 people

Cannot access App Store

Publish applications to employee devices through private stores

(4) University Developer Program

 

 

 

3. Basic knowledge of IOS development

What about MVC?

MVC is the most common design pattern in software development. Separate the data in the program from the interface. Display Data in the interface through the control layer.

Model: A data Model that stores all the data required by a program.

View: the user can see the interface

Control: the main business logic of the processing program. The data in the Model is sent to the View for display. Or send the data in the View to the Model for storage.

 

----------------------------------------------------------------------------

Apple is the supporter of the most robust MVC.

4. Complete a Hello World

(1) Create an IOS Application, Signle View (single View)

(2) Prepare the icon and backgroundImage and add them to the App project.

(3) Click the xxx. xib file to open the InterfaceBuilder (IB) interface. You can use this interface to learn information about an App view.

There are three basic concepts: File's Owner, First Responder, Object

(4) in the lower right corner of the database panel, search for UILabel and drag it to the View window in IB.

(5) set the text, color, Font, and other attributes of the Label in the top right corner of the property panel with 4th options;

(6) Click the "assistant" button to switch out of the code panel (usually the *. h file with the same name as the xib)

(7) Select the "Label" component and press the <control> button to drag and drop it into the. h file. A blue line is displayed. In the @ interface -- @ end dialog box, select IBOutlet and name. Click <create>

Completed above

<1> at the View layer, add two components, View and UILabel, to the file owner. xib file.

<2> In the control layer, xxxController. h class, the Declaration will transmit a data to the view to change the text on the interface.

 

File's Owner (File Owner-xib File ):

A. xib file is a View interface;

A. xib file encapsulates many components, such as text boxes and buttons.

Open the xib file using InterfaceBuilder (IB) and drag and drop the control;

After the design, Apple believes that all the controls are frozen in the xib file;

If the Controller code is to call or send a message to a control, you need to ask the xib file to tell the controller where the Label control and button control are.

The Xib File is the File's Owner of all controls.

 

One xib File has only one File's Owner.

 

 

 

First Responder (First Responder ):

Is the interface component currently being operated by the user. As the user's operations on the Interface change,

It is implemented by the IOS framework, so you don't have to worry about it.

 

 

 

 

 

 

Note:

After IOS5, the released XCode compiler replaces the GCC compiler with the LLVM3 (Low Level Virtual Machine) compiler.

You can automatically generate instance variables based on the @ propertity attribute.

 

 

 

Task:

1. Familiar with the use of IBOutlet IBAction in InterfaceBuilder

2. query the UIFont font API documentation. To enrich the text on the interface.

 

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.