由于某种原因,我找不到我收到以下错误:
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
因为我是 xCode 的新手,所以我需要一些帮助。应用程序在以下行中崩溃:
[self.window makeKeyAndVisible];
在 ASAppDelegate.m 文件中。
整个函数是这样的:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
// Override point for customization after application launch.
AS_MainViewController *MyrootViewController = [[AS_MainViewController alloc]
initWithNibName:@"AS_MainViewController" bundle: [NSBundle mainBundle]];
self.window.rootViewController = MyrootViewController;
self.window.backgroundColor = [UIColor whiteColor];
return YES;
}
请你帮助我好吗?
谢谢你。