Iphone development tutorial (1) iOS outline

Source: Internet
Author: User

IOS outline

IOS consists of the operating system and application technology. Although it shares many technologies with Mac OS X, iOS is designed specifically for mobile devices. Of course, if you have used Mac OS X applications before, you will find many similarities, but many technologies can only be used in iOS, such as supporting multiple contacts and remote sensing.

The iOS SDK contains APIs, documents, and tools used to develop, test, run, debug, and publish applications on the App Store. The official iOS IDE is Xcode. Xcode can compile, test, and tune your code, and set breakpoints to tune programs on your device, of course, in the application development stage, you can also use the simulator on Xcode to simulate your iOS environment, which can also be adjusted, compiled, and run. (Major iPhone games in the industry are mostly developed using vs c ++ and OpenGL. Xcode is only used for integration and testing .)

This article explains the iOS architecture from a relatively high level. You can also view other articles to help you quickly understand the underlying information of iOS.

Outline:

1. iOS technical level

2. write code for iOS

3. Start the iOS journey

 


1. iOS technical level

The iOS core layer is based on Mac OS X and has many basic classes in common. On the core layer, the service layer (iOS Services) provides APIs for applications.

Figure 1-1 iOS technical level

Most of the service layer (iOS Services) is written in C language. The core layer and service layer (iOS Services) contain many basic class libraries, such as low-level data types ), bonjour Service (Bonjour service is used to provide communication between devices and computers), network ETS, and so on. The service layer (iOS Services) includes the Foundation CORE class library, CFNetwork class library, SQLite access class library, POSIX Thread class library, and UNIX sockets communication class library.

The upper layer of the service layer (iOS Services) is the multimedia application layer, and the multimedia application layer is written in a mix of c language and Objective-C. The multimedia application layer contains basic class libraries to support 2D and 3D interface painting, audio and video playback. This layer includes some C-language-based technologies, such as OpenGL ES, Quartz, and Core Audio. Of course, it also includes a relatively high-level animation engine based on Objective-C.

The upper layer of the multimedia application layer (Media layer) is the Cocoa Touch layer, where most of the Code is based on Objective-C. This layer provides many basic class library foundations, such as object-oriented collection classes, file management classes, and network operation classes. For example, the UIKit framework provides visual programming methods, such as window, views, controls, and controllers management classes. Of course, other class libraries also provide some very useful functions, such as accessing users' Address Book, photo sets, gravity sensors, and accessing hardware devices.

If you want to start a new project immediately, you 'd better use the (Cocoa Touch) layer, especially when you are preparing to use the UIKit framework. It is easier to use a higher-level framework than a lower-level framework. We recommend that you use a lower-level framework only when there is no ready-made method for the higher-level framework.

For more technical details, see iOS Technology Overview.

2. Start to write code for iOS

IOS SDK supports creating a graphical application. The created application can be created on the iphone desktop and is independent of other programs, such as tablets, weather, and clock. It will be in an independent sandbox, which will be described later. When your program runs, your program occupies the entire iphone interface. If you have developed windows applications, you must be familiar with multi-document applications. Unfortunately, iOS does not support the multi-document mode. iOS applications can only be displayed in a separate window, you cannot switch between multiple windows in an application.

In iOS, the event processing mode is different from the classic Desktop System (windows. The typical event processing mode is the corresponding mouse and keyboard, because the main peripherals of the PC are the mouse and keyboard. IOS does not have a mouse or a keyboard, so iOS's event processing mode is based on touch. A touch event can occur at any time, or be combined with other touch events to form another event, such as multiple contacts. These touch events can be used to detect simple operations, such as selecting and dragging a project, or detecting complex operations, such as sliding (similar to swiping a card, cutting Effect in ninja fruits), pinching and pinching (Photo Enlargement and downsize operations ).

When preparing an iOS application, you should not only consider the code structure of the application, but also the basic architecture. More importantly, you should consider how users of the application will use it. IOS applications should be simple in operations and interfaces, and focus on the actual needs of end users. Remember, your user is very busy. What he needs is the fastest way to get the information he wants, instead of spending a lot of time switching between flashy interfaces. Therefore, please provide a simple interface layout and put the key information in a conspicuous position. In gaming or other entertainment applications, you can consider adding more interactive technologies, such as gravity sensing and camera technologies, which are rare on other gaming platforms.

When you first develop an iOS application, you may only use the Foundation and UIKit frameworks, which provide basic API support and some key services. However, when you want to upgrade your applications, you may need to integrate other frameworks. The following links help you learn more about the framework.

For more technical details, see Foundation Framework Reference and UIKit Framework Reference.

3. Start the iOS journey

To create a simple iOS application, the simplest thing is to use the Xcode template. Of course, if you want your application to be very easy to use and have a beautiful interface, you still need to read more relevant documents. At least you should read the article on how to use Xcode and how to create an application step by step in the official iOS Dev Center.

If you know nothing about iOS and Mac OS X, you need to spend some time understanding the basic design patterns and internal structures of the platform. Because your application is the smoothest and most powerful only when your application chooses the most powerful framework. So if you spend some time selecting these frameworks, you may find it much more difficult to create an application than to learn the basic design patterns. Every iPhone or iOS developer needs to understand the Cocoa Fundamentals Guide framework. This document describes the design patterns of Objective-C and UIKit. Of course, there are some other frameworks.

After understanding the basic architecture, you can view the iOS Application Programming Guide, which provides detailed development details and development processes. This document provides important information about how to compile the concepts and tasks of iPhone applications, including some instances: how to create user interfaces, event processing, and some key functions of iOS. It also describes the entire development process and explains how to use Xcode to compile and run applications.

In addition to reading this document, you should also browse some official Apple code examples. The sample code contains almost all iOS technical points. You can use the sample code to start your application or learn the detailed usage of some technical points.

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.