私は風景のみをサポートしようとしています。このダイアログボックスを表示するには、アプリケーションに関するいくつかのことを初めて説明する新しい要件があります。だから、のviewDidLoadで、発売します私の最初のビューコントローラでは、私はこのコードを持っている:次にFirstUseViewControllerで、私はこの定義したModalViewControllerを表示すると起動時に私のアプリの向きが変わります
BOOL showFirstTimeUse = [[NSUserDefaults standardUserDefaults] boolForKey:@"ShowFirstTimeUse"];
if (!showFirstTimeUse) {
FirstUseViewController *tvc = [[FirstUseViewController alloc] initWithNibName:@"FirstUseViewController" bundle:nil];
tvc.modalPresentationStyle = UIModalPresentationFormSheet;
tvc.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:tvc animated:YES];
[tvc release];
}
:IBで
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return UIInterfaceOrientationLandscapeLeft | UIInterfaceOrientationLandscapeRight;
}
を、私はいずれも変更されていませんデフォルト設定の私は基本的にちょうどUIWebViewを画面の左上にドロップしてデータを表示し、コンセントを接続して書式付きのテキストを簡単に表示できるようにしました。
私は今、私のアプリケーションを実行すると、このビューコントローラのプレゼンテーションは、私のアプリが風景ではなくポートレートで起動するようになります。これをどうやって解決するのですか?ありがとう。