2011-11-09 18 views
0

これまでは、「完了」ボタンは問題なくiOS 4.3で正常に動作しました。ビューを閉じると、別のビデオを選択できるようになりました。 iOS 5.0にアップグレードしたので、「完了」ボタンは単にコントロールを保持しながら画面を黒くします。ここで私はボタン「完了」を打ったときに呼び出されるコードは次のとおりです。MPMoviePlayerController完了ボタンはiOS 5.0では動作しません。 iOS 4.3で動作しました

// When the movie is done, release the controller. 
-(void) myMovieFinishedCallback: (NSNotification*) aNotification 
{ 
    MPMoviePlayerController* theMovie = [aNotification object]; 

    [[NSNotificationCenter defaultCenter] 
    removeObserver: self 
    name: MPMoviePlayerPlaybackDidFinishNotification 
    object: theMovie]; 

    [theMovie setFullscreen:YES animated:NO]; 
    [theMovie.view removeFromSuperview];  

    [theMovie release]; 

    [self.navigationController setNavigationBarHidden:NO]; 
} 

誰もが「完了」ボタンは、アプリケーションの動作を変更し、そしてどのように私がそれを得ることができる理由として任意のアイデアを持っていますiOS 4.3のようにビデオを閉じますか? TIA。ここで

+1

http://stackoverflow.com/questions/6142571/mpmovieplayer-done-button-issue/6142685#6142685 – Till

+0

フィードバックをいただきありがとうございます - 私はstackoverflowに関するいくつかの他の議論を見ていましたが、私は見つかりませんでしたそれです。 – Roger

答えて

0

は、私は問題を解決するためにやってしまったものです:

// When the movie is done, release the controller. 
-(void) myMovieFinishedCallback: (NSNotification*) aNotification 
{ 
    videoPlayer.view.hidden = true; 

    [self.navigationController setNavigationBarHidden:NO]; 
} 

これが悪いプログラミングであるなら、私に知らせてくださいので、私は、Objective-Cのプログラミングでまだかなり新しいですのでご注意ください。

関連する問題