self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]]; UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
if (orientation==UIInterfaceOrientationLandscapeLeft || orientation==UIInterfaceOrientationLandscapeRight)
{ self.viewController=[[EBHomeViewController alloc] initWithNibName:@"EBHomeViewController-LA" bundle:nil] ;
}
else if(orientation==UIInterfaceOrientationPortrait || orientation==UIInterfaceOrientationPortraitUpsideDown)
{
self.viewController=[[EBHomeViewController alloc] initWithNibName:@"EBHomeViewController-PT" bundle:nil] ;
}
navController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
self.window.rootViewController = navController;
[self.window makeKeyAndVisible];
applicationDidFinishLaunching中没有繁重的代码。我们安装应用程序&第一次打开它/重启iPad&启动申请。