For some reason that I cannot find I am getting the following error:
Terminating app due to uncaught exception 'NSInvalidArgumentException',
reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
As I am quite new in xCode i'd like some help. The application crashes in the following line:
[self.window makeKeyAndVisible];
in the ASAppDelegate.m file.
The whole function is like this:
- (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;
}
Could you please help me?
Thank you.