次のコードがあります。
- (void)initAndStartTranslation:(NSURL *)movieURL
{
player = [[MPMoviePlayerController alloc] initWithContentURL: movieURL];
[self.view addSubview: player.view];
[player.view setFrame: self.view.bounds];
[player setControlStyle:MPMovieControlStyleFullscreen];
[player setInitialPlaybackTime: -1.0];
[player prepareToPlay];
[player play];
}
- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation
{
[player.view setFrame: self.view.bounds];
}
プレーヤーはフルスクリーンで、すべて問題ありません。ただし、(0,0) 座標で回転します。中心に回転させたい。どうすればできますか?
アンカーポイントを設定しようとしましたが、中心を設定しようとしました:
[player.view setCenter:self.view.center];
しかし、変化はありませんでした:|。