我正在 iPhone 模拟器和设备上正确开发和测试我的 iphone 应用程序(phonegap + native)。
但是,在 iPad 模拟器或设备上进行测试时,我只能看到一个空白的黑屏,并且在控制台上没有错误。
目标系列已正确设置为 iPhone,并且窗口 makeKeyAndVisible 也已执行!如何解决?
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
UIViewController *introVC = [[videoViewController alloc] initWithNibName:@"videoViewController" bundle:nil];
UIViewController *blogVC = [[blogViewController alloc] initWithNibName:@"blogViewController" bundle:nil];
NSArray *viewControllers = [NSArray alloc];
viewControllers = [NSArray arrayWithObjects: introVC, blogVC, nil];
[rootController setViewControllers:viewControllers animated:NO];
self.rootController.selectedIndex = 0;
[window setRootViewController:self.rootController];
[window makeKeyAndVisible];
return YES;
}