作者:Rain雨露Dew | 来源:互联网 | 2023-09-04 16:49
Myiphoneapprunsoniphonesimulatoranddevicesbutnotonipadsimulator.Itdoesntshowingany
My iphone app runs on iphone simulator and devices but not on ipad simulator. It doesnt showing any errors but the application is not launching just blank black screen only displays.
我的iphone应用程序在iphone模拟器和设备上运行,但在ipad模拟器上运行。它没有显示任何错误,但应用程序不启动只显示空白黑屏。
While running in ipad simulator 5 it showing following error "applications are expected to have a root view controller at the end of application launch"
在ipad模拟器5中运行时,它显示以下错误“应用程序在应用程序启动结束时应该有一个根视图控制器”
My application didFinishLaunchingWithOptions code is as below :
我的应用程序didFinishLaunchingWithOptions代码如下:
rootViewCOntroller= [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
[self.rootViewController.view setFrame:CGRectMake(0, 20, 320, 460)];
[self.window addSubview:self.rootViewController.view];
[self.window makeKeyAndVisible];
return YES;
And my main.m code is as below :
我的main.m代码如下:
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
What is the wrong with this???
这有什么问题?
3 个解决方案