iOS应用程序基于Foundation和UIKit框架
在你开发程序时,主要使用框架就是Foundation和UIKit,因为它们包含了你需要的大部分东西。
Foundation框架为所有的应用程序提供基本系统服务
你的应用程序,UIKit和其它的框架都是建立在Foundation框架上面的。Foundation框架是用Object-C对Core Foundation框架里许多特性的封装。
使用Foundation可以:
创建和管理集合,比如数组和字典
访问存储在应用程序里的图片和其它资源
创建和管理字符串
提交和接收通知
创建日期和时间对象
自动发现IP网络上的设备
操作URL流
执行异步代码
UIKit框架提供创建基于触摸用户界面的类
所有的iOS应用程序都基于UIKit,你不能是应用程序脱离这个框架。UIKit提供了在屏幕上绘制的机制,捕获事件,和创建通用用户界面元素。UIKit也通过管理显示在屏幕上的组件来组织复杂的项目。
使用UIKit可以:
构建和管理你的用户界面
捕获触摸和基于移动的事件
呈现文字和web内容
优化你的多任务程序
创建定制的用户界面元素
Core Data框架管着理应用程序数据模型
Core Data提供对象的管理,使用Core Data,你可以创建模型对象,并管理这些对象。你管理这这些对象间的联系并修改数据。Core Data提供的内建SQLlite技术可以高效的管理数据。
使用Core Data可以:
在库里存储和接收对象
提供基本的undo/redo
自动验证属性值
过滤、分组和优化内存中的数据
用[NSFetchedResultsController]管理表视图中的结果
支持基于文档的应用程序
Core Graphics框架帮助你创建图形
高质量的图形对于所有的iOS应用程序都是很重要的。在iOS中最简单且最快捷的创建图形的方式是使用UIKit框架提供的基于预渲染图形的视图和控件,然后让UIKit和iOS完成绘制。但是当你需要创建复杂的图形时,Core Graphics则提供了更底层的库来帮助你。
使用Core Graphics可以:
创建基于路径的绘图
抗锯齿渲染
添加梯度、图片和颜色
Use coordinate-space transformations.
创建、显示和分析PDF文档
Core Animation允许你创建高级的动画和虚拟效果
UIKit提供建立在Core Animation之上的动画。如果你需要比UIKit能力更高级的功能,可以直接使用Core Animation。Core Animation接口包含在Quartz Core框架里。使用Core Animation可以创建嵌套的对象,并且可以对它们操作、旋转、缩放和转换。使用Core animation,你可以创建动态的用户界面而不用使用更底层的图形API,如OpenGL ES。
使用Core Animation可以:
创建定制动画
添加定时函数和图形
支持帧动画
Specify graphical layout constraints.
Group multiple-layer changes into anatomic update.
OpenGL ES 框架提供2D和3D绘图工具
OpenGL ES支持2D和3D绘图,Apple的OpenGL ES实现通过硬件提供了高速的全屏游戏式的应用程序。
使用OpenGL ES可以:
创建2D和3D图形
创建更复杂的图形,比如数据虚拟化、模拟飞行,或者视频游戏
访问底层图形设备
| 名称 | 最先引入 | 前缀 | 描述 |
| --- | --- | --- | --- |
| Accelerate.framework | 4.0 | cblas,vDSP | 包含加速数学和DSP函数。 请查看 [加速框架参考](http://developer.apple.com/iphone/library/documentation/Accelerate/Reference/AccelerateFWRef/index.html#/apple_ref/doc/uid/TP40009465) 。 |
| AddressBook.framework | 2.0 | AB | 包含直接访问用户联系人数据库的函数。请查看[地址簿框架参考](http://developer.apple.com/iphone/library/documentation/AddressBook/Reference/AddressBook_iPhoneOS_Framework/index.html#/apple_ref/doc/uid/TP40007212)。 |
| AddressBookUI.framework | 2.0 | AB | 包含显示系统定义的联系人挑选界面和编辑界面的类。请查看[iOS地址簿UI框架参考](http://developer.apple.com/iphone/library/documentation/AddressBookUI/Reference/AddressBookUI_Framework/index.html#/apple_ref/doc/uid/TP40007082) 。 |
| AssetsLibrary.framework | 4.0 | AL | 包含显示用户照片和视频的类,请查看[资源库框架参考](http://developer.apple.com/iphone/library/documentation/AssetsLibrary/Reference/AssetsLibraryFramework/index.html#/apple_ref/doc/uid/TP40009730) 。 |
| AudioToolbox.framework | 2.0 | AU,Audio | 包含处理音频流数据以及播放或录制音频的接口。请查看[音频工具箱框架参考](http://developer.apple.com/iphone/library/documentation/MusicAudio/Reference/CAAudioTooboxRef/index.html#/apple_ref/doc/uid/TP40002089)。 |
| AudioUnit.framework | 2.0 | AU,Audio | 包含加载并使用音频单元的接口。请查看[音频单元框架参考](http://developer.apple.com/iphone/library/documentation/AudioUnit/Reference/AudioUnit_Framework/index.html#/apple_ref/doc/uid/TP40007295). |
| AVFoundation.framework | 2.2 | AV | 包含播放或录制音频的Objective-C接口。请查看[AV Foundation框架参考](http://developer.apple.com/iphone/library/documentation/AVFoundation/Reference/AVFoundationFramework/index.html#/apple_ref/doc/uid/TP40008072).。 |
| CFNetwork.framework | 2.0 | CF | 包含通过WiFi或者蜂窝无线访问网络的接口。请查看[CFNetwork框架参考](http://developer.apple.com/iphone/library/documentation/CFNetwork/Reference/CFNetwork_Framework/index.html#/apple_ref/doc/uid/TP40007128)。 |
| CoreAudio.framework | 2.0 | Audio | 包含Core Audio框架使用的各种数据类型。请查看[Core Audio 框架参考](http://developer.apple.com/iphone/library/documentation/MusicAudio/Reference/CACoreAudioReference/index.html#/apple_ref/doc/uid/TP40002090) 。 |
| CoreData.framework | 3.0 | NS | 包含管理应用程序数据模型的接口。请查看[Core Data 框架参考](http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/CoreData_ObjC/index.html#/apple_ref/doc/uid/TP40001181) 。 |
| CoreFoundation.framework | 2.0 | CF | 提供一些基本软件服务,包括常见数据类型抽象、字符串实用工具、群体类型实用工具、资源管理以及偏好设置。请查看rov[Core Foundation框架参考](http://developer.apple.com/iphone/library/documentation/CoreFoundation/Reference/CoreFoundation_Collection/index.html#/apple_ref/doc/uid/TP40003849)。 |
| CoreGraphics.framework | 2.0 | CG | 包含Quartz 2D接口。请查看[Core Graphics 框架参考](http://developer.apple.com/iphone/library/documentation/CoreGraphics/Reference/CoreGraphics_Framework/index.html#/apple_ref/doc/uid/TP40007127) 。 |
| CoreLocation.framework | 2.0 | CL | 包含确定用户方位信息的接口。请查看[Core Location 框架参考](http://developer.apple.com/iphone/library/documentation/CoreLocation/Reference/CoreLocation_Framework/index.html#/apple_ref/doc/uid/TP40007123)。 |
| CoreMedia.framework | 4.0 | CM | 包含操作音频和视频的底层例程。请查看[Core Media 框架参考](http://developer.apple.com/iphone/library/documentation/CoreMedia/Reference/CoreMediaFramework/index.html#/apple_ref/doc/uid/TP40009756)。 |
| CoreMotion.framework | 4.0 | CM | 包含访问加速度计以及陀螺仪的数据的接口。请查看[Core Motion 框架参考](http://developer.apple.com/iphone/library/documentation/CoreMotion/Reference/CoreMotion_Reference/index.html#/apple_ref/doc/uid/TP40009686)。 |
| CoreTelephony.framework | 4.0 | CT | 包含访问电话相关的信息的例程。请查看[Core Telephony 框架参考](http://developer.apple.com/iphone/library/documentation/NetworkingInternet/Reference/CoreTelephonyFrameworkReference/index.html#/apple_ref/doc/uid/TP40009603)。 |
| CoreText.framework | 3.2 | CT | 包含一个文本的布局渲染引擎。请查看[Core Text参考集](http://developer.apple.com/iphone/library/documentation/Carbon/Reference/CoreText_Framework_Ref/index.html#/apple_ref/doc/uid/TP40005304).。 |
| CoreVideo.framework | 4.0 | CV | 包含操作音频和视频的底层例程。请不要直接使用该框架。 |
| EventKit.framework | 4.0 | EK | 包含访问用户日历事件数据的接口。请查看[Event Kit 框架参考](http://developer.apple.com/iphone/library/documentation/EventKit/Reference/EventKitFrameworkRef/index.html#/apple_ref/doc/uid/TP40009662)。 |
| EventKitUI.framework | 4.0 | EK | 包含显示标准系统日历界面的类。请查看[Event Kit UI 框架参考](http://developer.apple.com/iphone/library/documentation/EventKitUI/Reference/EventKitUIFrameworkRef/index.html#/apple_ref/doc/uid/TP40009663)。 |
| ExternalAccessory.framework | 3.0 | EA | 包含与外设进行通讯的接口。请查看[External Accessory 框架参考](http://developer.apple.com/iphone/library/documentation/ExternalAccessory/Reference/ExternalAccessoryFrameworkReference/index.html#/apple_ref/doc/uid/TP40008235)。 |
| Foundation.framework | 2.0 | NS | 包含Cocoa Foundation层的类和方法。请查看[Foundation 框架参考](http://developer.apple.com/iphone/library/documentation/Cocoa/Reference/Foundation/ObjC_classic/index.html#/apple_ref/doc/uid/20001091)。 |
| GameKit.framework | 3.0 | GK | 包含点对点连接管理接口。请查看[Game Kit 框架参考](http://developer.apple.com/iphone/library/documentation/GameKit/Reference/GameKit_Collection/index.html#/apple_ref/doc/uid/TP40008303)。 |
| iAd.framework | 4.0 | AD | 包含在应用程序中显示广告的类。请查看[iAd 框架参考](http://developer.apple.com/iphone/library/documentation/UserExperience/Reference/iAd_ReferenceCollection/index.html#/apple_ref/doc/uid/TP40009705)。 |
| ImageIO.framework | 4.0 | CG | 包含读取或写入图像数据的类。请查看[Image I/O 参考集](http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/ImageIORefCollection/index.html#/apple_ref/doc/uid/TP40005102)。 |
| IOKit.framework | 2.0 | N/A | 包含设备所使用的接口。请不要直接使用此框架。 |
| MapKit.framework | 3.0 | MK | 包含将地图界面嵌入到应用程序的类,也可以用于查找地理编码反向坐标。请查看[Map Kit框架参考](http://developer.apple.com/iphone/library/documentation/MapKit/Reference/MapKit_Framework_Reference/index.html#/apple_ref/doc/uid/TP40008210)。 |
| MediaPlayer.framework | 2.0 | MP | 包含显示全屏视频的接口。请查看[Media Player 框架参考](http://developer.apple.com/iphone/library/documentation/MediaPlayer/Reference/MediaPlayer_Framework/index.html#/apple_ref/doc/uid/TP40006952)。 |
| MessageUI.framework | 3.0 | MF | 包含撰写和排队发送电子邮件信息的界面。请查看[Message UI 框架参考](http://developer.apple.com/iphone/library/documentation/MessageUI/Reference/MessageUI_Framework_Reference/index.html#/apple_ref/doc/uid/TP40008274)。 |
| MobileCoreServices.framework | 3.0 | UT | 定义系统支持的统一类型标识符(UTIs)。 |
| OpenAL.framework | 2.0 | AL | 包含OpenAL接口。OpenAL是一个跨平台的方位音频库。如需进一步了解,请访问[http://www.openal.org](http://www.openal.org/)。 |
| OpenGLES.framework | 2.0 | EAGL,GL | 包含OpenGL ES接口。OpenGL ES框架是OpenGL跨平台2D和3D渲染库的跨平台版本。请查看[OpenGL ES 框架参考](http://developer.apple.com/iphone/library/documentation/OpenGLES/Reference/OpenGLES_Framework/index.html#/apple_ref/doc/uid/TP40007628)。 |
| QuartzCore.framework | 2.0 | CA | 包含Core Animation接口。请查看[Quartz Core 框架参考](http://developer.apple.com/iphone/library/documentation/GraphicsImaging/Reference/QuartzCoreRefCollection/index.html#/apple_ref/doc/uid/TP40004291)。 |
| QuickLook.framework | 4.0 | QL | 包含预览文件接口。请查看[Quick Look 框架参考](http://developer.apple.com/iphone/library/documentation/QuickLook/Reference/QuickLookFrameworkReference_iPhoneOS/index.html#/apple_ref/doc/uid/TP40009672)。 |
| Security.framework | 2.0 | CSSM,Sec | 包含管理证书、公钥私钥以及信任策略的接口。请查看[Security框架参考](http://developer.apple.com/iphone/library/documentation/Security/Reference/SecurityFrameworkReference/index.html#/apple_ref/doc/uid/TP40004330)。 |
| StoreKit.framework | 3.0 | SK | 包含用于处理与应用程序内购买相关的财务交易。请查看 [Store Kit 框架参考](http://developer.apple.com/iphone/library/documentation/StoreKit/Reference/StoreKit_Collection/index.html#/apple_ref/doc/uid/TP40008300)。 |
| SystemConfiguration.framework | 2.0 | SC | 包含用于处理设备网络配置的接口。请查看[System Configuration框架参考](http://developer.apple.com/iphone/library/documentation/Networking/Reference/SysConfig/index.html#/apple_ref/doc/uid/TP40001027)。 |
| UIKit.framework | 2.0 | UI | 包含iOS应用程序用户界面层使用的类和方法。请查看[UIKit 框架参考](http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIKit_Framework/index.html#/apple_ref/doc/uid/TP40006955)。 |
网友评论