MPMoviePlayer LoadState DidChangeNotification需要什么头文件?

时间:2011-12-15 09:40:44

标签: ios mpmovieplayercontroller

我不知道应该包含哪个头文件。

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(loadStateDidChange:) name:MPMoviePlayerLoadStateDidChangeNotification object:nil];

错误:未声明的标识符MPMoviePlayerLoadStateDidChangeNotification

抱歉,我找到了解决方案

#import <MediaPlayer/MediaPlayer.h>

1 个答案:

答案 0 :(得分:1)

http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html状态MPMoviePlayerController.h就在文档中(引用):

MPMoviePlayerLoadStateDidChangeNotification 通知观察者网络缓冲状态已更改。受影响的电影播放器​​存储在通知的对象参数中。没有userInfo字典。可以从影片播放器控制器的loadState属性中检索当前的加载状态。

状况 适用于iOS 3.2及更高版本。

宣布进入 MPMoviePlayerController.h

在iOS开发中心进行一次或两次搜索,这些事情几乎总是存在; - )

相关问题