2009-12-03 54 views
3

我遇到了MPMoviePlayerContentPreloadDidFinishNotification通知的問題。 我已經註冊接收MPMoviePlayerContentPreloadDidFinishNotification通知和MPMoviePlayerPlaybackDidFinishNotification,但第一個不會觸發。 固件OS 3.0中存在這個錯誤嗎?也許固定在3.1?要麼 ?因爲我的工具和similator是3.0也許這是一個錯誤?MPMoviePlayerContentPreloadDidFinishNotification不會觸發[iPhone]

我的代碼:

... 
[[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永遠不會被解僱。 有什麼建議嗎?

回答

0

我用一種解決方法解決了類似問題here。這並不理想,但如果找不到其他解決方案,可能值得一看。