I have a UIButton in an iPhone app that plays a movie when I click on it. The code for playing the movie is as follows:
NSURL *url = [[NSBundle mainBundle] URLForResource:@"Robot" withExtension:@"m4v"]; moviePlayer = [[MPMoviePlayerController alloc] initWithContentURL:url]; moviePlayer.controlStyle = MPMovieControlModeDefault; [moviePlayer.view setFrame: self.view.bounds]; [self.view addSubview: moviePlayer.view]; [moviePlayer play];
I would like the movie to open in full screen mode, like all movies did before the iOS 3.2 update, where the blue βFinishβ button was in the upper left corner and the video played in landscape mode by default.
Does anyone know how to do this? Thanks.
objective-c iphone ios4 mpmovieplayercontroller
rottendevice
source share