我遇到了MPMoviePlayerContentPreloadDidFinishNotification通知的问题。 我已经注意接收MPMoviePlayerContentPreloadDidFinishNotification通知和MPMoviePlayerPlaybackDidFinishNotification,但第一个从未触发。 这是固件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,但永远不会触发MPMoviePlayerContentPreloadDidFinishNotification。 有什么想法吗?