views:

1408

answers:

3

I am playing movie using MPMoviePlayerController,

I am using TableView,what happening with my application is when I press accessory button it will display detailed view and when I press cell area it will play movie that I wanted,(the way youtube application does)

but when I press "DONE" while playin movie it'll navigate to a view which is not my detail view but some empty view.

Any idea what should I do to achieve it so that when user press "DONE" it will nevigate me to my detail view instead of some empty view.

I tried to push view when "movieFinishedCallback" is executed but it'll pushing one more view on that empty view.

+2  A: 

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

You do not need to do anything in the movieDidFinishCallback except maybe release the movieplayer object.

lostInTransit
Lets say that the MPMoviePlayerController got created by a UIWebView. How would you get at the "Done" button then? (It doesn't follow in the usual UIWebViewDelegate).
David Sowsy
A: 

Same is happening with me, did you find the solution to this problem? I am even releasing the MPMoviePlayerController after using it but still an empty view appears on pressing Done.

raziiq
A: 

-(void)myMovieFinishedCallback:(NSNotification*)aNotification{

MPMoviePlayerController* theMovie=[aNotification object];

theMovie.initialPlaybackTime = -1.0;

}

ReinYem