iOS 7.1 API 有哪些新變化

伯樂線上讀者發表於2014-03-13

蘋果今日釋出了iOS 7.1,調整了部分API,以下是 iOS 7.1 中有更新的API。注:無變化的API,本文並沒有列出來。

General Headers
/usr/include/dispatch/introspection.h
新增 dispatch_introspection_hook_queue_item_complete()

AVFoundation
AVAudioSession.h
新增 AVAudioSessionErrorCodeCannotStartRecording
新增 AVAudioSessionPortCarAudio

CoreBluetooth
CBError.h
新增 CBErrorConnectionFailed
4196_140311120654_1
CBUUID.h
新增 CBUUID.UUIDString

CoreMedia
CMBufferQueue.h
新增 CMBufferGetSizeCallback
新增 CMBufferQueueGetTotalSize()

CMTime.h
新增 CMTimeMultiplyByRatio()

iAd
ADClient.h (新增)
新增 ADClient
新增 -[ADClient determineAppInstallationAttributionWithCompletionHandler:]
新增 +[ADClient sharedClient]

MapKit

MKAnnotationView.h

修改 MKAnnotationView.annotation

Declaration
From @property(nonatomic, retain) id<MKAnnotation> annotation
To @property(nonatomic, strong) id<MKAnnotation> annotation

修改 MKAnnotationView.image

Declaration
From @property(nonatomic, retain) UIImage *image
To @property(nonatomic, strong) UIImage *image

修改 MKAnnotationView.leftCalloutAccessoryView

Declaration
From @property(retain, nonatomic) UIView *leftCalloutAccessoryView
To @property(strong, nonatomic) UIView *leftCalloutAccessoryView

修改 MKAnnotationView.rightCalloutAccessoryView

Declaration
From @property(retain, nonatomic) UIView *rightCalloutAccessoryView
To @property(strong, nonatomic) UIView *rightCalloutAccessoryView

MKMapItem.h

新增 MKLaunchOptionsCameraKey

修改 MKMapItem.placemark

Declaration
From @property(nonatomic, readonly, retain) MKPlacemark *placemark
To @property(nonatomic, readonly) MKPlacemark *placemark

修改 MKMapItem.url

Declaration
From @property(nonatomic, retain) NSURL *url
To @property(nonatomic, strong) NSURL *url

MKMapView.h

修改 MKMapView.delegate

Declaration
From @property(nonatomic, assign) id<MKMapViewDelegate> delegate
To @property(nonatomic, weak) id<MKMapViewDelegate> delegate

MKMultiPoint.h

刪除 MKMultiPoint.points

新增 -[MKMultiPoint points]

MKOverlayPathRenderer.h

修改 MKOverlayPathRenderer.fillColor

Declaration
From @property(retain) UIColor *fillColor
To @property(strong) UIColor *fillColor

修改 MKOverlayPathRenderer.strokeColor

Declaration
From @property(retain) UIColor *strokeColor
To @property(strong) UIColor *strokeColor

MKOverlayPathView.h

修改 MKOverlayPathView.fillColor

Declaration
From @property(retain) UIColor *fillColor
To @property(strong) UIColor *fillColor

修改 MKOverlayPathView.strokeColor

Declaration
From @property(retain) UIColor *strokeColor
To @property(strong) UIColor *strokeColor

MKReverseGeocoder.h

修改 MKReverseGeocoder.delegate

Declaration
From @property(nonatomic, assign) id<MKReverseGeocoderDelegate> delegate
To @property(nonatomic, weak) id<MKReverseGeocoderDelegate> delegate

MKUserLocation.h

修改 MKUserLocation.heading

Declaration
From @property(readonly, nonatomic, retain) CLHeading *heading
To @property(readonly, nonatomic) CLHeading *heading

修改 MKUserLocation.location

Declaration
From @property(readonly, retain, nonatomic) CLLocation *location
To @property(readonly, nonatomic) CLLocation *location

MKUserTrackingBarButtonItem.h

修改 MKUserTrackingBarButtonItem.mapView

Declaration
From @property(nonatomic, retain) MKMapView *mapView
To @property(nonatomic, strong) MKMapView *mapView

MediaPlayer

MPContentItem.h (新增)

新增 MPContentItem

新增 MPContentItem.artwork

新增 MPContentItem.container

新增 MPContentItem.identifier

新增 -[MPContentItem initWithIdentifier:]

新增 MPContentItem.playable

新增 MPContentItem.playbackProgress

新增 MPContentItem.subtitle

新增 MPContentItem.title

MPPlayableContentDataSource.h (新增)

新增 MPPlayableContentDataSource

新增 -[MPPlayableContentDataSource beginLoadingChildItemsAtIndexPath:completionHandler:]

新增 -[MPPlayableContentDataSource childItemsDisplayPlaybackProgressAtIndexPath:]

新增 -[MPPlayableContentDataSource contentItemAtIndexPath:]

新增 -[MPPlayableContentDataSource numberOfChildItemsAtIndexPath:]

MPPlayableContentDelegate.h (新增)

新增 MPPlayableContentDelegate

新增 -[MPPlayableContentDelegate playableContentManager:initiatePlaybackOfContentItemAtIndexPath:completionHandler:]

MPPlayableContentManager.h (新增)

新增 MPPlayableContentManager

新增 -[MPPlayableContentManager beginUpdates]

新增 MPPlayableContentManager.dataSource

新增 MPPlayableContentManager.delegate

新增 -[MPPlayableContentManager endUpdates]

新增 -[MPPlayableContentManager reloadData]

新增 +[MPPlayableContentManager sharedContentManager]

MPRemoteCommand.h (新增)

新增 MPChangePlaybackRateCommand

新增 MPChangePlaybackRateCommand.supportedPlaybackRates

新增 MPFeedbackCommand

新增 MPFeedbackCommand.active

新增 MPFeedbackCommand.localizedTitle

新增 MPRatingCommand

新增 MPRatingCommand.maximumRating

新增 MPRatingCommand.minimumRating

新增 MPRemoteCommand

新增 -[MPRemoteCommand addTarget:action:]

新增 -[MPRemoteCommand addTargetWithHandler:]

新增 MPRemoteCommand.enabled

新增 -[MPRemoteCommand removeTarget:]

新增 -[MPRemoteCommand removeTarget:action:]

新增 MPSkipIntervalCommand

新增 MPSkipIntervalCommand.preferredIntervals

新增 MPRemoteCommandHandlerStatus

新增 MPRemoteCommandHandlerStatusCommandFailed

新增 MPRemoteCommandHandlerStatusNoSuchContent

新增 MPRemoteCommandHandlerStatusSuccess

MPRemoteCommandCenter.h (新增)

新增 MPRemoteCommandCenter

新增 MPRemoteCommandCenter.bookmarkCommand

新增 MPRemoteCommandCenter.changePlaybackRateCommand

新增 MPRemoteCommandCenter.dislikeCommand

新增 MPRemoteCommandCenter.likeCommand

新增 MPRemoteCommandCenter.nextTrackCommand

新增 MPRemoteCommandCenter.pauseCommand

新增 MPRemoteCommandCenter.playCommand

新增 MPRemoteCommandCenter.previousTrackCommand

新增 MPRemoteCommandCenter.ratingCommand

新增 MPRemoteCommandCenter.seekBackwardCommand

新增 MPRemoteCommandCenter.seekForwardCommand

新增 +[MPRemoteCommandCenter sharedCommandCenter]

新增 MPRemoteCommandCenter.skipBackwardCommand

新增 MPRemoteCommandCenter.skipForwardCommand

新增 MPRemoteCommandCenter.stopCommand

新增 MPRemoteCommandCenter.togglePlayPauseCommand

MPRemoteCommandEvent.h (新增)

新增 MPChangePlaybackRateCommandEvent

新增 MPChangePlaybackRateCommandEvent.playbackRate

新增 MPFeedbackCommandEvent

新增 MPFeedbackCommandEvent.negative

相關文章