私は問題をテストするために、以下のコードを使用しています。Addsubviewを使用して他のコントローラのビューを追加する理由は、ビューは20ポイント下に移動しますか?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
UIViewController *controller = [[UIViewController alloc] init];
controller.view.backgroundColor = [UIColor whiteColor];
[window setRootViewController:controller];
UIViewController *controller2 = [[UIViewController alloc] init];
[controller.view addSubview:controller2.view];
controller2.view.backgroundColor = [UIColor yellowColor];
UIViewController *controller3 = [[UIViewController alloc] init];
controller3.view.backgroundColor = [UIColor purpleColor];
[controller2.view addSubview:controller3.view];
[window makeKeyAndVisible];
return YES;
}
と私は、シミュレータやiPhone上でそれらを実行すると、この問題は私のプロジェクトで発生するので、私は非常に困惑んだけど、私は、システムのフォトピッカーを使用したとき、それが現れます image
こと表示されます。 だから、誰が助けてくれるのですか、どうもありがとう。
私の答え[ここ](http://stackoverflow.com/questions/6399054/uitabbarcontroller-only-showing-half-of-its-uitabbar-off-screen/6399280#6399280)も見てください。 。 –