3

プロジェクトを縦向きで開発しましたが、プロジェクトの向きを横向きに設定したいと思います。すべての xib ファイルの向きプロパティを横向きに設定し、.plist でも、サポートされているインターフェイスの向きのすべての項目を横向きに設定しましたが、プロジェクトを実行すると、1 つのビューがまだ縦向きになります... このビューでは、私が表示していますpdf ファイル。

前もって感謝します !!!

4

2 に答える 2

2

ビューコントローラーに次のメソッドを入れましたか

- (BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return YES;
}
于 2011-03-04T08:15:12.993 に答える
1

ランドスケープがこのコードを使用する場合

(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return (interfaceOrientation==UIInterfaceOrientationLandscapeLeft || interfaceOrientation==UIInterfaceOrientationLandscapeRight);
}

ポートレートがこのコードを使用する場合

(BOOL) shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)toInterfaceOrientation {
    return (interfaceOrientation==UIInterfaceOrientationPortrait || interfaceOrientation==UIInterfaceOrientationPortraitUpsideDown);
}
于 2012-05-04T09:14:55.037 に答える