Mt rootViewController(即第一个视图控制器)没有占据全屏,而其他 VC 则占据了(见截图)。在 IB 中,它们看起来相同。我正在使用 iOS 6 / iOS 5.1 模拟器。
我的 AppDelegate 方法看起来很无辜。有什么建议么?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
// hide status bar
[UIApplication sharedApplication].statusBarHidden = YES;
_window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// allocate the root view controller
_window.rootViewController = [[LMHomeViewController alloc] init];
// add a navigation controller
[LMNavigationController initSharedInstanceWithRootViewController:self.window.rootViewController];
[_window addSubview:LMNavigationController.sharedInstance.view];
// show the window
[_window makeKeyAndVisible];
return YES;
}