我的应用程序的起点是这个窗口(白色背景):
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
mainScreen = [[MainScreenController alloc] initWithNibName:@"MainScreenController" bundle:[NSBundle mainBundle]];
// add it to the main window
[window addSubview:[mainScreen view]];
// show view
[window makeKeyAndVisible];
NSLog(@"started");
return YES;
}
MainScreenController 是由 Interface Builder 创建的带有 (blackBackground) 的 UIViewController。
应用程序完美执行,但第一次,黑色视图像状态 iphone 面板的高度一样向上移动(在底部留下白色矩形)。
如果我将 iPhone 旋转两次,视图将完美地定位在正确的位置,黑色背景填充了整个屏幕。
任何的想法?
谢谢!