MPMoviePlayerController のサイズを動的に変更して、iPhone/iPad (縦向きと横向きの両方) のすべての画面サイズを修正するにはどうすればよいですか?
これは私のコードです:
- (void)viewDidLoad
{
[super viewDidLoad];
UIBarButtonItem *about = [[UIBarButtonItem alloc] initWithTitle:@"About" style:UIBarButtonItemStyleDone target:self action:@selector(openPopup)];
self.navigationItem.leftBarButtonItem = about;
NSURL *streamURL = [NSURL URLWithString:@"http:/streamUrl/playlist.m3u8"];
_streamPlayer = [[MPMoviePlayerController alloc] initWithContentURL:streamURL];
self.streamPlayer.controlStyle = MPMovieControlStyleEmbedded;
[self.view addSubview: self.streamPlayer.view];
[self.streamPlayer play];
}
私も追加しようとしました
[self.streamPlayer.view setFrame:self.view.bounds];
ただし、これにより、スクリーンショットに示すように、ビデオが画面に固定されなくなります
すべての異なるデバイスのすべての画面を修正するにはどうすればよいですか? 前もって感謝します。