Get started developing iOS Apps article summary

Source: Internet
Author: User


Development environment: OS X 10.10 + Xcode 6.1

Apple developer the original link address:

https://developer.apple.com/library/ios/referencelibrary/GettingStarted/RoadMapiOSCh/ThirdTutorial.html#// Apple_ref/doc/uid/tp40012668-ch10-sw1

1. Environment settings

1). get Xcode free from the Apple Store (with the iOS SDK)

2). If additional iOS SDK is required, you can use Xcode>preferences>downloads to get


2. About creating an application

Since Xcode 6 creates an application with only the following templates and no empty application in the article, you can choose the single View application template instead.


3. About the application development process

1). define the concept (simply what you want to do with the app)

2). Designing the user interface

3). ways to define interactions and implement corresponding behaviors

4). consolidate data (i.e. data source)

iOS development follows the MVC design pattern: V (the interface that the user can see), M (that is, the data source and related operations to him), C (Connecting views and models, respectively, acting as intermediaries, responding to user actions and populating the view with content, typically uiviewcontroller or its subclasses).


4. How the controller communicates with the view (outlet and action)

1). Operation (Action)

An action is a piece of code (in a controller class) that is associated with a class of events that may occur in an application. Responds to user events or system events.

Definition Format:-(ibaction) ActionName: (ID) sender;

Describe:

(1). The Ibaction return type is a special keyword (typedef void ibaction) that can be connected to the operation on storyboard.

(2). ActionName is the operation name.

(3). The sender parameter points to the object that triggered the action.

2). Outlet

Outler lets you refer to objects on the interface (such as text input boxes) in the controller source file. How to create: Select the specified object (such as the text input box) on the interface, and then press control to drag it directly to the Controller class file.

The reference to an object on the interface in the controller class is typically in the following format: @property (weak, nonatomic) Iboutlet typeName *objname;

Describe:

(1). Iboutlet is used to inform Xcode that you can connect objects on the interface to this property. (definition: #define Iboutlet)

(2). TypeName: For object type (e.g. Uitextfield)

(3). objname: Name of the object

3). Control (that is, user interface objects, such as buttons, sliders, etc.)

User interaction with Controls (interface objects) creates control events, common event types:

1). Touching and dragging events

2). Edit Event

3). Value Change Event


5. Scenarios and Transitions

Storyboard is made up of a series of scenes, each representing a view + corresponding controller. The scene is connected by a transition, that is, the transition between the two view controllers is represented by transitions.

Transition Type:

(1). Push: Add the destination view controller to the navigation stack

(2). Modal: A view controller is displayed in modal mode for another controller, which is returned to the main process.

(3). Unwind: Reverse navigation, you need to create a similar operation in the destination controller class:-(Ibaction) ActionName: (Uistoryboardsegue *) Segue


6. Summarize the development process

(1). Create Project: Xcode>file>new>project

(2). Configuration Items

(3). Create storyboard and Design the interface

(4). Add a View controller (Uiviewcontroller and its subclasses) for each scene on the storyboard, using the identity to specify the controller class

(5). Create the Iboutler property for the storyboard on the interface object so that the controller class can manipulate the interface object

(6). Create the Ibaction action method on the view controller and connect the events on the interface object on the storyboard

(7). Design the data model class and use it in the Controller class.



This article is from the "Yandong-ios Study notes" blog, so be sure to keep this source http://yandonghuang.blog.51cto.com/9573867/1576867

Get started developing iOS Apps article summary

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.