3

理由はわかりませんが、iPhone を回転させても PhoneGap アプリが画面を回転しません。最も単純なコードでは機能しないため、コードを投稿しても意味がありません<div>Hello World!</div

向きの設定もチェックしています: ここに画像の説明を入力 ここに画像の説明を入力

次に例を示します (実際のデバイスでも同じことが起こります)。 ここに画像の説明を入力

4

2 に答える 2

3

私と同じ問題。デリゲートに iOS6 の次の行を追加して解決しました。

- (NSUInteger)application:(UIApplication*)application supportedInterfaceOrientationsForWindow:(UIWindow*)window
{
    NSUInteger supportedInterfaceOrientations = (1 << UIInterfaceOrientationPortrait) | (1 << UIInterfaceOrientationLandscapeLeft) | (1 << UIInterfaceOrientationLandscapeRight) | (1 << UIInterfaceOrientationPortraitUpsideDown);

    return supportedInterfaceOrientations;
}

また、メイン コントローラーに以下を追加します。

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return true;
}
于 2012-11-12T18:34:09.520 に答える