Previously the "Done" button worked fine with no problems in iOS 4.3--it would dismiss the view and allow the user to select a different video. Now that I've upgraded to iOS 5.0, the "Done" button simply causes the screen the go black while keeping the controls. Here is the code that is called when I hit the "Done" button:
// 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];
}
Does anyone have any ideas as to why the "Done" button changed the behaviour of the application, and how I can get it to close the video like it did in iOS 4.3? TIA.