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.
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 about core Data, Core Graphics, Core Animation, and opengles frameworks are advanced technologies. So these frameworks are also important for you to develop applications that require time to learn and master.
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
The Core graphics framework helps 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
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.
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.
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
Table 1 frames in the device
Name |
First introduced |
Prefix |
Describe |
Accelerate.framework
|
4.0 |
Cblas , Vdsp
|
Includes accelerated math and DSP functions. Please see the Acceleration Framework reference. |
Addressbook.framework
|
2.0 |
Ab
|
Contains functions that directly access the user's contact database. Please view the Address Book frame reference. |
Addressbookui.framework
|
2.0 |
Ab
|
Contains classes that display the system-defined contact selection interface and editing interface. Please see the iOS Address Book UI Framework reference. |
Assetslibrary.framework
|
4.0 |
AL
|
Contains classes that display user photos and videos, see the resource Pool Framework reference. |
Audiotoolbox.framework
|
2.0 |
AU , Audio
|
Contains interfaces for processing audio stream data and for playing or recording audio. Please see the Audio Toolbox frame reference. |
Audiounit.framework
|
2.0 |
AU , Audio
|
Contains an interface that loads and uses an audio unit. Please see the Audio Unit frame reference. |
Avfoundation.framework
|
2.2 |
Av
|
Contains the Objective-c interface for playing or recording audio. Please see the AV Foundation Framework Reference: |
Cfnetwork.framework
|
2.0 |
Cf
|
Includes an interface to access the network over WiFi or cellular. Please see the cfnetwork frame reference. |
Coreaudio.framework
|
2.0 |
Audio
|
Contains the various data types used by the core audio framework. Please see the core Audio frame reference. |
Coredata.framework
|
3.0 |
Ns
|
Contains an interface that manages the application data model. Please see the core Data Framework reference. |
Corefoundation.framework
|
2.0 |
Cf
|
Provides basic software services, including common data type abstractions, string utilities, group type utilities, resource management, and preferences. Please see the Rovcore Foundation Framework Reference. |
Coregraphics.framework
|
2.0 |
Cg
|
Contains the Quartz 2D interface. Please see the core Graphics frame reference. |
Corelocation.framework
|
2.0 |
Cl
|
Contains an interface that determines user orientation information. See Core location frame reference. |
Coremedia.framework
|
4.0 |
Cm
|
Contains the underlying routines for manipulating audio and video. See Core Media Frame reference. |
Coremotion.framework
|
4.0 |
Cm
|
An interface that includes access to the accelerometer and the data of the gyroscope. See Core Motion Frame reference. |
Coretelephony.framework
|
4.0 |
Ct
|
A routine that contains information about access to the phone. See Core Telephony Frame reference. |
Coretext.framework
|
3.2 |
Ct
|
A layout rendering engine that contains a text. Please see the core text reference set: |
Corevideo.framework
|
4.0 |
CV
|
Contains the underlying routines for manipulating audio and video. Please do not use the framework directly. |
Eventkit.framework
|
4.0 |
EK
|
An interface that contains access to user calendar event data. Please see the event Kit Framework reference. |
Eventkitui.framework
|
4.0 |
EK
|
Contains classes that display the standard system calendar interface. Please see the event Kit UI Framework reference. |
Externalaccessory.framework
|
3.0 |
Ea
|
Contains interfaces for communicating with peripherals. Please see the external accessory frame reference. |
Foundation.framework
|
2.0 |
Ns
|
Classes and methods that contain the Cocoa foundation layer. Please see the Foundation Framework reference. |
Gamekit.framework
|
3.0 |
Gk
|
Contains a point-to-point connection management interface. Please see the game Kit frame reference. |
Iad.framework
|
4.0 |
AD
|
Contains classes that display ads in the application. Please see the IAD framework reference. |
Imageio.framework
|
4.0 |
Cg
|
Contains classes that read or write image data. Please review the image I/O reference set. |
Iokit.framework
|
2.0 |
N/A |
Contains the interface used by the device. Please do not use this framework directly. |
Mapkit.framework
|
3.0 |
Mk
|
Contains classes that embed a map interface into an application, and can also be used to find geocoding inverse coordinates. Please see the map Kit frame reference. |
Mediaplayer.framework
|
2.0 |
Mp
|
Contains an interface that displays full-screen video. Please see the media Player Framework reference. |
Messageui.framework
|
3.0 |
Mf
|
Contains an interface for composing and queuing sending e-mail messages. Please review the message UI Framework reference. |
Mobilecoreservices.framework
|
3.0 |
Ut
|
Defines the uniform type identifier (UTIS) supported by the system. |
Openal.framework
|
2.0 |
AL
|
Contains the OpenAL interface. OpenAL is a cross-platform, Azimuth Audio library. For further information, please visit http://www.openal.org. |
Opengles.framework
|
2.0 |
Eagl , Gl
|
Contains the OpenGL ES interface. The OpenGL ES Framework is a cross-platform version of OpenGL cross-platform and 3D rendering libraries. Please see the OpenGL ES Framework reference. |
Quartzcore.framework
|
2.0 |
Ca
|
Contains the core animation interface. See the Quartz Core Framework reference. |
Quicklook.framework
|
4.0 |
Ql
|
Contains the preview file interface. Please see the quick look frame reference. |
Security.framework
|
2.0 |
CSSM , Sec
|
Contains interfaces for managing certificates, public key private keys, and trust policies. Please review the security framework reference. |
Storekit.framework
|
3.0 |
Sk
|
Contains financial transactions for processing in-app purchases. Please see the Store Kit frame reference. |
Systemconfiguration.framework
|
2.0 |
Sc
|
Contains an interface for handling device network configuration. Please see the System Configuration Framework reference. |
Uikit.framework
|
2.0 |
Ui
|
Contains classes and methods used by the iOS application user interface layer. Please see the Uikit frame reference. |
The main framework of IOS