Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/41.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
MPMoviePlayerContentPreloadedFinishNotification未触发[iPhone]_Iphone_Mpmovieplayercontroller - Fatal编程技术网

MPMoviePlayerContentPreloadedFinishNotification未触发[iPhone]

MPMoviePlayerContentPreloadedFinishNotification未触发[iPhone],iphone,mpmovieplayercontroller,Iphone,Mpmovieplayercontroller,我在MPMoviePlayerContentPreloadedFinishNotification中遇到问题。 我已注册接收MPMoviePlayerContentPreloadDidFinishNotification和MPMoviePlayerPlayerPlaybackDidFinishNotification,但第一个从未触发。 这是固件OS 3.0中的错误吗?可能在3.1中修复?或因为我的divice和similator是3.0也许这是个bug 我的代码: ... [[NSNotifi

我在MPMoviePlayerContentPreloadedFinishNotification中遇到问题。 我已注册接收MPMoviePlayerContentPreloadDidFinishNotification和MPMoviePlayerPlayerPlaybackDidFinishNotification,但第一个从未触发。 这是固件OS 3.0中的错误吗?可能在3.1中修复?或因为我的divice和similator是3.0也许这是个bug

我的代码:

...
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MovieDidLoad:) name:MPMoviePlayerContentPreloadDidFinishNotification object:nil];

[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(MovieDidLoad:) name:MPMoviePlayerPlaybackDidFinishNotification object:nil];
...
-(void)MovieDidLoad:(NSNotification*)notification
{
    UIAlertView *alert = [[UIAlertView alloc] 
                          initWithTitle:@"Notification Listener" 
                          message:@"Notification Listener invoked" 
                          cancelButtonTitle:@"Ok dude!" 
                          otherButtonTitles:nil];   
    [alert show]; 
    [alert release];    

}
始终激发MPMoviePlayerPlaybackDidFinishNotification,但从不激发MPMoviePlayerContentPreload DidFinishNotification。
有什么想法吗?

我用变通方法回答了一个类似的问题。这并不理想,但如果找不到其他解决方案,可能值得一看