iOS 7弃用了哪些API?
2013-06-14 13:47
316 查看
我们知道苹果在iOS 7 SDK中开放了超过1500个新的API,但我们也知道随着开发技术和设备的进步,有些过时的API是必须废弃掉的,我们来看看苹果在iOS 7中弃用了哪些API。
1.The Map Kit framework includes deprecations for the MKOverlayView class and its various subclasses. The existing overlay views have been replaced with an updated set of overlay renderer objects that descend from theMKOverlayRenderer class. For more information about the classes of this framework, seeMap Kit Framework Reference.
2.The AudioSession API in the Audio Toolbox framework is deprecated. Applications should use the***AudioSession class in the *** Foundation framework instead.
3.TheCLRegion class in the Core Location framework is replaced by the CLCircularRegion class. The CLRegion class continues to exist as an abstract base class that supports both geographic and beacon regions.
4.The UUID property of the CBCentral class is deprecated. To specify the unique ID of your central objects, use the identifier property instead.
5.The Game Kit framework contains assorted deprecations intended to clean up the existing API and provide better support for new features.
6.The UIKit framework contains the following deprecations:
ThewantsFullScreenLayoutproperty of UIViewController is deprecated. In iOS 7 and later, view controllers always support full screen layout.
The UIPopoverController class no longer supports the notion of an arrow direction; it supports a presentation direction.
UIColor objects that provided background textures for earlier versions of iOS are gone.
7.Many drawing additions to the NSString class are deprecated in favor of newer variants.
8.The gethostuuid function in theNSString library is deprecated.
9.In iOS 7 and later, if you ask for the MAC address of an iOS device, the system returns the value 02:00:00:00:00:00. If you need to identify the device, use the identifierForVendor property of UIDevice instead. (Apps that need an identifier for their own advertising purposes should consider using theadvertisingIdentifier property of ASIdentifierManager instead.)
不过,苹果也不会立刻终结某些API的寿命,会有一个限定时期以方便开发者过渡至新的更好的API。有时,一些API可能是在某些事件暂停使用,做一些更改,而有的API可能会永远远离操作系统了。
作为一个开发者,要尽量避免使用已经弃用的API,至少新代码或者新项目中不能再使用弃用的API,如果现在的代码中使用了弃用的API,要尽可能快地更新你的代码。不过,编译器会在使用弃用API的时候给予提醒。
更多API变更的详细信息可查看:iOS 7.0 API Diffs.
相关文章推荐
- iOS 7.0 以上一些弃用的系统API替换
- IOS 8弃用api
- 关于iOS 弃用API适配系统版本的最佳写法
- IOS 8弃用api
- IOS 8弃用api
- iOS开发日志之GCD常用API
- iOS学习笔记–12 IOS之多媒体API
- AFNetworkingErrorDomain Code=-1011 "Request failed: internal server error (500)",IOS与API交互失败
- 2012 年新推出 iOS 应用中,(除游戏以外)哪些最值得称道?
- 查看iOS/Mac 的私有API - 使用class-dump
- iOS ReactiveCocoa 常用API整理(可做为手册查询)
- iOS webView API
- IOS原生API扫描二维码
- iOS 7 新特性:视图控制器切换API
- 飞利浦为Hue照明系统发布免费iOS SDK和API
- IOS 调用系统发邮件Api
- IOS开发的哪些异常之异常断点
- ios 开发中经常用到的 栏控件(bar) 有哪些呢?
- iOS 自动生成api文档
- iOS API更新