横向きのみのアプリを使用しています。シミュレーターを実行すると、デバイスは横向きモードに回転しますが、画面は縦向きモードで表示しようとします。
ここに私がすでに試した手順があります
私のルートView ControllerはNavigation Controllerなので、サブクラス化して追加しました
- (NSUInteger)supportedInterfaceOrientations {
return UIInterfaceOrientationMaskLandscape;
}
- (BOOL)shouldAutorotate {
return YES;
}
個々のView Controllerに対してもそれを試みましたが、結果はありませんでした。
これは私がアプリデリゲートに持っているものです
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
home = [[Home alloc] initWithNibName:@"Home" bundle:nil];
navController = [[NavControllerSubClass alloc] initWithRootViewController:home];
[self.window setRootViewController:navController];
// used to be [self.window addSubview:navController.view];
[self.window makeKeyAndVisible];
return YES;
}
他の解決策はありますか?