我有一個視頻播放器。當我嘗試以全屏模式播放時,它來自左上角。我怎樣才能解決這個問題?`左上角的視頻播放
-(void)video_player:(int)index {
NSString *soundFilePath = [[NSBundle mainBundle] pathForResource:[_video_Array objectAtIndex:index] ofType: nil];
url = [[NSURL alloc] initFileURLWithPath: soundFilePath];
AVPlayerItem *currentItem = [AVPlayerItem playerItemWithURL:url];
_playerViewController = [[AVPlayerViewController alloc] init];
_playerViewController.videoGravity = AVLayerVideoGravityResize;
_playerViewController.view.frame = self.view.bounds;
_playerViewController.showsPlaybackControls = NO;
_video = [AVPlayer playerWithPlayerItem:currentItem];
_playerViewController.player = _video;
_playerViewController.view.userInteractionEnabled = false;
_playerViewController.view.backgroundColor = [UIColor whiteColor];
[_playerViewController.player play];
self.view.autoresizesSubviews = YES;
[self.view addSubview:_playerViewController.view];
}
`