MPMoviePlayerController and status bar in iPad
Posted
by hgpc
on Stack Overflow
See other posts from Stack Overflow
or by hgpc
Published on 2010-05-17T21:16:32Z
Indexed on
2010/05/17
21:20 UTC
Read the original article
Hit count: 2268
I want to show a MPMoviePlayerController in a view controller and let the user toggle full screen with the default controls. I'm using the following code in a bare-bones example:
- (void)viewDidLoad {
[super viewDidLoad];
self.player = [[MPMoviePlayerController alloc] init];
self.player.contentURL = theURL;
self.player.view.frame = self.viewForMovie.bounds;
self.player.view.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
[self.viewForMovie addSubview:player.view];
[self.player play];
}
This works well until the user makes the video full screen, rotates the device and taps on the screen. The status bar is shown in the wrong position, as shown in the screenshot below.
http://www.freeimagehosting.net/image.php?be371fe3e8.png
What am I doing wrong?
© Stack Overflow or respective owner