0

次のコードがあります。

- (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];

しかし、変化はありませんでした:|。

4

2 に答える 2

1

では、次のことを試してみましょう。

xib ファイルに移動します。ビューを選択します。

右側のペインで、サイズを設定したタブをクリックします。

その下に語源のボックスがあります。

原点を中心に変更します。結果を教えてください。

于 2013-09-28T18:23:43.263 に答える