Part I: iOS Development overview
1. IOS System Architecture
iOS is UNIX-based, and in terms of system stability, it's much better than other operating systems, and we can trust this operating system!
The system architecture of iOS is divided into four levels:
1) touch-up layer
2) Media Services layer
3) Core Service layer
4) core Operating system layer
Such as:
2. Features at all levels in the iOS system architecture
Touch Layer (CocoaTouch): Provides a variety of useful frameworks for application development, most of which are related to the user interface, which is essentially responsible for the user's touch interaction on the iOS device.
Media Services Layer:responsible for providing the graphics and sound APIs for building applications, using a variety of media files in your application, recording audio and video, drawing graphics, and animating the basics.
Core Services Layer:This layer provides access to the core OS layer's hardware capabilities and includes the foundation framework. Because of this, this layer provides many of the underlying components needed to build an iOS application, such as strings, arrays, and other common data types. The core service layer can access some of the iOS services, such as network connectivity, file access, databases, user targeting, and so on.
CoreOS layer: This level includes many of the underlying components of the iOS operating system, including: System kernel, memory management, file system, power management, network components, and device drivers, which can interact directly with the hardware device.
3. iOS System Framework Table
Frame name |
Function |
Foundation |
provide OC the underlying class (like NSObject ), basic data types, etc. |
UIKit |
Creating and managing the user interface for an application |
Quartzcore |
Provides animation effects and the ability to render through hardware |
Coregraphics |
provide 2D drawn based on the C of the API |
SystemConfiguration |
Detects if the current network is available and hardware device status |
Avfoundation |
provides the bottom of audio recording and playback API , and is also responsible for managing audio hardware |
< strong> cfnetwork |
Access and configure the network, like HTTP FTP and Bonjour Services |
< strong> corefoundation |
Unicode strings " XML URL |
Corelocation |
Use GPS and the WIFI Get location information |
Frame name |
Function |
Gamekit |
Network functions for games: Peer-to-peer and in-game voice communication |
AddressBook |
Provides the ability to access user contact information |
Addressbookui |
Provides a user interface to display contact information stored in the Address Book |
Audiotoolbox |
provides the bottom of audio recording and playback API , and is also responsible for managing audio hardware |
AudioUnit |
Provides an interface that enables applications to process audio |
Mapkit |
An interface that provides an inline map for an application |
MediaPlayer |
Provides the ability to play video and audio |
Messageui |
provides a view control interface to handle e-Mail and SMS |
Opengles |
Provides animation effects and the ability to render through hardware |
Storekit |
Provides support for applications to consume in the run of programs |
4. IOS and Android system architecture comparison
Android is based on the Linux kernel and runs a Java virtual machine on top of the Linux kernel, and the virtual machine runs the software. Like a system above a system, so account for a large amount of memory, running slightly lower.
iOS is UNIX-based and communicates directly with the underlying hardware. The system bottom, application framework, application software are written in C + + or objective-c, so there is a high operational efficiency.
Part II: Hello World
Environment:
OS x:10.9.2
xcode:5.1.1
Goal:
1. New Project
2. Build the interface
3. Monitor button click events
4. Get the contents of the text box and display the results in a text label
Notes:
1. Create a Stroyboard project,
2. Build the interface
3. Monitor button click events
4. Get the contents of the text box and display the results in a text label
Note:
1. If you click on the "Editor" button, the editing area appears on the left and right page
Can be in "view"-"Assistant editor"-"Assistant editor on Botton",
modified to the upper and lower structure for rendering.
2. It can be found thatthe word "Iboutlet", "Ibaction", which is prefixed with IB, is generated automatically when connecting.
is due to the use of the Interface Builder tool. Outlet-is the telling program can manipulate objects.
3. Usually, in the content of a class, using its own properties, in order to improve efficiency, you can use member variables instead of attributes,
For example: _txtusername.text can be substituted (self.lblUserName.text).
The purpose of defining attributes is to ensure that internal data is secured for other classes when accessing this class.
4. When the text box is entered, a keyboard is automatically ejected. When you click the "Finish" button,
If you want to hide the keyboard, you can use [Self.view Endediting:yes];
---iCode, love life.
Lesson1--iOS development overview && HelloWorld