2011-12-15 48 views
0

我不知道我应该包含哪个头文件。MPMoviePlayerLoadStateDidChangeNotification需要什么头文件?

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

错误:未声明的标识符MPMoviePlayerLoadStateDidChangeNotification

对不起,我找到解决

#import <MediaPlayer/MediaPlayer.h> 

回答

1

http://developer.apple.com/library/ios/#documentation/mediaplayer/reference/MPMoviePlayerController_Class/Reference/Reference.html状态MPMoviePlayerController.h正确的,在该文档(报价):

MPMoviePlayerLoadStateDidChangeNotification 通知观察家认为网络ork缓冲状态改变。受影响的电影播放器​​存储在通知的对象参数中。没有userInfo字典。当前的加载状态可以从电影播放器​​控制器的loadState属性中获取。

可用性 适用于iOS 3.2或更高版本。

宣布 MPMoviePlayerController.h

请在iOS的开发中心搜索一次或两次,这样的事情几乎总是有;-)