A brief introduction to OBJECTIVE-C learning 05-foundation framework

Source: Internet
Author: User

the so-called framework in iOS, after all, is a directory, and iOS provides a lot of frameworks that we can call in the application. 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. For example, when we create a Xcode project under OSX application, the system will help us introduce the Foundation framework by default: #import <Foundation/Foundation.h> If the default framework does not meet the needs of your application, you can also join the framework you need. to use a framework, you need to add it to the project you created so that your project can use it. when we develop iOS projects, the primary framework used is the foundation and Uikit Framework, which provides the underlying system services for all applications, and the Uikit framework provides a class based on the user interface.

iOS Common base Framework

Frame name

Function

Foundation

Provides basic classes of OC (like nsobject,nsstring, etc.), 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

Provides a C-based API for 2D drawing

SystemConfiguration

Detects if the current network is available and hardware device status

Avfoundation

Provides the underlying API for audio recording and playback, as well as managing audio hardware

Cfnetwork

Access and configure networks, like HTTP, FTP, and Bonjour Services

Corefoundation

Provides abstract common data types such as Unicode strings, XML, URLs, etc.

Corelocation

Get location information using GPS and WiFi

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 for displaying contact information stored in the Address Book

Audiotoolbox

Provides the underlying API for audio recording and playback, as well as managing audio hardware

AudioUnit

Provides an interface that allows our 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

and commonly used third-party open source framework afnetworking and so on.

Foundation framework

(The frame on the left is part of the official Apple document, and the right side shows the header file for the class under the foundation framework)

The so-called foundation.framework framework is that Apple encapsulates some of our commonly used classes into this framework, and the common classes are mainly Nsstring,nsdate,nsarray,nsdictionary,nsset, NSNumber, classes in OC can be classified as immutable (immutable) classes and variable (mutable) classes, and instance objects of immutable classes are called immutable objects. An object that cannot be changed after it is created. An instance object of a mutable class is called a Mutable object, which is an object that can change its contents or state after it is created. Using Foundation we can:

    • 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

  Well, to learn good systems to provide good classes we can:

1. Learn to use Apple's official API (Application Programming Interface, Application programming Interface) documentation

2. Directly view the header file of the class

Option + left mouse button to enter the API documentation for the Class (beginner)

Command + Left key into the class header file by looking at the way the file, suitable for this class have a certain understanding of the classmate.

3. When viewing API documentation, focus on which keywords

Inherits from which class to inherit from

Conforms to indicate which protocols this class follows

The framework of this class defines the

Availability This class supports this class from which version of iOS

Declared in declaration

A brief introduction to OBJECTIVE-C learning 05-foundation framework

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.