My app delegate contains:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
// Override point for customization after app launch
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
if (!window)
{
[self release];
return;
}
window.backgroundColor = [UIColor greenColor];
[window addSubview:viewController.view];
[window makeKeyAndVisible];
[window layoutSubviews];
}
This does get executed, apparently with no errors. The window variable is NOT 0
so the test if (! window)
does not cause the function to return. However no green-background window appears, just the default color. And in the appController.m file, code in the viewDidLoad method does execute. However CGContextRef context = UIGraphicsGetCurrentContext();
returns null rather than a real context.
What am I leaving out?