iOS development--The main frame of &ios of practical technology chapter OC

Source: Internet
Author: User
Tags uikit

The main framework of iOS

Read Catalogue

    • Foundation Framework provides basic system services for all applications
    • Uikit Framework provides a class for creating a touch-based user interface
    • Core Data Framework tube Application data Model
    • The Core graphics framework helps you create graphics
    • Core animation allows you to create advanced animations and virtual effects
    • OpenGL ES Framework provides 3D drawing tools
    • Add another frame to the project

This article is the translation of the article "Sunvey the Major framworks"

The framework is a directory that contains shared libraries, access to the header files of the code in the shared library, and other resource files for pictures and sounds. A method or function defined by a shared library can be called by an application.

iOS provides a lot of frameworks that you can call in your application. To use a framework, you need to add it to your project before it can be used by your project. Many applications use frameworks such as Foundation, UIKit, and core graphics. Depending on the template you choose for your application, the relevant framework has been introduced automatically. If the default framework does not meet the needs of your application, you can also join the required framework.

See what frameworks are included in the Helloworld.xcodeproj project (note: Helloworld.xcodeproj is a project in the tutorial "Your first IOS App Tutorial")

1. Open the Helloworld.xcodeproj project in Xcode (if it is not yet open)

2. Click in the Project Navigator window and click the triangle icon in front of the frameworks directory. You will see:

Uikit.framework,foundation.framework, and Coregraphics.framework.

3. Click on the triangle in front of any of the frameworks and then click on the triangle in front of headers to see the header files in the frame.

Each frame corresponds to a layer in the iOS system, and each layer is built on top of the layer below it. You should try to use the upper frame instead of the frame below. A higher-level framework is an object-based abstraction of the underlying framework.



IOS apps based on Foundation and UIKit framework

when you develop a program, the main use frame is foundation and uikit, because they contain most of what you need.

Foundation Framework provides basic system services for all applications

your application, Uikit, and other frameworks are built on top of the foundation framework. The foundation framework is the encapsulation of many features in the core Foundation framework with OBJECT-C.

Use Foundation to:

    • Create and manage collections, such as arrays and dictionaries
    • Access to images and other resources stored in the application
    • Creating and managing strings
    • Submit and receive notifications
    • Create date and Time objects
    • Automatically discover devices on an IP network
    • Action URL Flow
    • Execute asynchronous code

You've already used the foundation framework in the Your first IOS App. For example, you use an instance of the NSString class to store user-entered username. You also created a string using the Initwithformat method of the foundation framework.

Back to top Uikit Framework provides a class for creating a touch-based user interface

All iOS apps are based on Uikit and you can't be an application out of this framework. Uikit provides a mechanism for drawing on-screen, capturing events, and creating common user interface elements. Uikit also organizes complex projects by managing the components that appear on the screen.

Use Uikit to:

    • Build and manage your user interface
    • Capturing touch and mobile-based events
    • rendering text and Web content
    • Optimize your multi-tasking program
    • Create a custom user interface element
In "Youfirst IOS App Tutorial", you also use Uikit. When you look at how the program works, you see the Uiapplicationmain function creates an instance of the UIApplication class that captures incoming user events. You implement the Uitextfielddelegate protocol and then hide the keyboard when the user presses done. In fact, you are using Uikit to create Uitextfield, UILabel, and UIButton classes on the user interface.
other important frameworks you need to know
core Data, Core Graphics, Core Animation, and opengles frameworks are all advanced technologies. So these frameworks are also important for you to develop applications that require time to learn and master. Back to top core data framework tube Application data Model

Core data provides the management of objects, and with core data, you can create model objects and manage those objects. You manage the relationships between these objects and modify the data. Core data provides the built-in Sqllite technology to efficiently manage the information.

With core data, you can:

    • Storing and receiving objects in a library
    • Provide the basic Undo/redo
    • Automatic validation of property values
    • Filter, group, and optimize in-memory data
    • Managing results in a table view with [Nsfetchedresultscontroller]
    • Support for document-based applications
Back to the top core graphics framework to help you create graphics

High-quality graphics are important for all iOS applications. The simplest and quickest way to create graphics in iOS is to use the Uikit framework to provide views and controls based on pre-rendered graphics, and then have Uikit and iOS finish drawing. But when you need to create complex graphics, the Core graphics provides a lower-level library to help you.

Using the core graphics, you can:

    • Create a path-based drawing
    • Anti-aliasing rendering
    • Add gradients, pictures, and colors
    • Use Coordinate-space transformations.
    • Create, display, and analyze PDF documents
Back to top core animation allows you to create advanced animations and virtual effects

Uikit provides animations built on top of the core animation. If you need more advanced capabilities than Uikit, you can use the core Animation directly. The core animation interface is included in the quartz core framework. With core animation, you can create nested objects and manipulate, rotate, scale, and transform them. With core animation, you can create a dynamic user interface without using a lower-level graphical API, such as OpenGL ES.

With core animation you can:

    • Create custom animations
    • Adding timed functions and graphs
    • Support for Frame animations
    • Specify graphical layout constraints.
    • Group multiple-layer changes into anatomic update.
Back to top OpenGL ES Framework provides 3D drawing tools

OpenGL ES supports 2D and 3D drawings, and Apple's OpenGL ES implementations provide high-speed, full-screen gaming applications via hardware.

Using OpenGL ES, you can:

    • Creating 2D and 3D graphics
    • Create more complex graphics, such as data virtualization, flight simulations, or video games
    • Accessing the underlying graphics device
add additional frames to your project as needed

There are a number of frameworks that you can add to your program. When you decide to use a framework but the project does not introduce the framework, you need to add it to your project.


Back to Top add another frame to the project

1 Opening the project

2 Click on the project name to display projects editor

3 Select the project to add a frame to in the targets list

4 Click Build phases at the top of Project editor

5 Click link Binary with libraries in front of the triangle to open this group

6 Add a frame by clicking Add (+)

7 Select a frame in the list and click the Add button

iOS development--The main frame of &ios of practical technology chapter OC

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.