viewController を追加する UITabBarController がありますが、位置がずれています。画面の上部に 20px ほどの隙間があり、読み込んだ viewController の下部が隠れています。ロードされたviewControllerのサイズを変更するにはどうすればよいですか?
viewController = [[FlashCardViewController alloc] initWithNibName:@"FlashCardViewController" bundle:[NSBundle mainBundle]];
viewController.view.bounds = [[UIScreen mainScreen]bounds];
//viewController.view.alpha = 0.0;
//[self.view addSubview:viewController.view];
tabBarController = [[UITabBarController alloc] initWithNibName:nil bundle:nil];
tabBarController.viewControllers = [NSArray arrayWithObject:viewController];
tabBarController.view.alpha = 0.0;
[self.view addSubview:tabBarController.view];
私はこれらの両方を試しましたが、うまくいきませんでした。
tabBarController.view.bounds = [[UIScreen mainScreen] bounds];
tabBarController.view.frame = [[UIScreen mainScreen] bounds];
とにかく、それは私がやろうとしていることではありません。ウィンドウのサイズと位置を表示する tabBarController に設定したいと思います。