2010-12-08 26 views
0

こんにちは ビデオがサポートされていないリストにある場合、白い画面が表示されます。そして、私は彼らの保持カウントはここ4ビデオ再生時に白い画面が表示される

に増加しているMPMoviePlayerControllerを初期化する際に前の画面(ナビゲーションバーあまりにも表示されていない)へ行くには、ユーザが を.AND方法は私のコードは

ある
mMPMovieViewCont=[[MPMoviePlayerViewController alloc]initWithContentURL:theURL]; 
     [theURL release]; 
     theURL=nil; 
     [[NSNotificationCenter defaultCenter] addObserver:self 
                selector:@selector(movieDidFinishForOS4:) 
                 name:MPMoviePlayerPlaybackDidFinishNotification 
                 object:nil]; 

     [self.navigationController presentMoviePlayerViewControllerAnimated:mMPMovieViewCont]; 
     NSLog(@"%d",[mMPMovieViewCont retainCount]); //**here count is 4** 
- (void) movieDidFinishForOS4:(NSNotification*)notification { 

mMPMovieViewCont.moviePlayer.initialPlaybackTime=-1.0;  
[mMPMovieViewCont dismissMoviePlayerViewControllerAnimated]; 
[[NSNotificationCenter defaultCenter] removeObserver:self 
               name:MPMoviePlayerPlaybackDidFinishNotification 
               object:nil]; 
NSLog(@"%d",[mMPMovieViewCont retainCount]); //returning 3 

[mMPMovieViewCont release]; 
mMPMovieViewCont = nil; 

ありません}

ios4.2を使用しています

答えて

1

retainCountを呼び出しないでください。プロダクションでは役に立たず、デバッグには誤解を招きます。

保持回数はあなたの質問とは全く関係ありません。 「ビデオがサポートされていない場合は白い画面が表示されています。」という意味はわかりませんが、ビデオがデバイスまたは承認されたプレイリストと互換性があるかどうかを確認する必要があるようです再生を開始する前に?

関連する問題