When I click "DONE" while playing a movie with MPMoviePlayerController the view of which will be displayed

I am playing a movie using MPMoviePlayerController,

I am using a TableView, what happens to my application, when I click on the accessory button, it will display the detail view, and when I click on the cell area, it will play the movie I wanted (as the YouTube application does)

but when I press "DONE" while playing in the movie it will go to a view which is not my detail view but some empty view.

Any idea what I have to do to achieve it so that the user clicks "DONE" it will take me to my detail view instead of some empty view.

I tried to hit "view" when "movieFinishedCallback" is done, but it pops up another view on this empty view.

+1


source to share


2 answers


Ideally, if your code is correct, clicking the Done button on the MPMoviePlayerController object will close the MPMOviePlayerController and return to the controller that invoked it (which in your case is the detail view).



You don't need to do anything in movieDidFinishCallback other than maybe free the movieplayer object.

+2


source


-(void)myMovieFinishedCallback:(NSNotification*)aNotification { 
    MPMoviePlayerController* theMovie = [aNotification object]; 
    theMovie.initialPlaybackTime = -1.0;
}

      



0


source







All Articles