My piece of code is...
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
window.backgroundColor = [UIColor blackColor];
CGRect rect = CGRectMake(0,0,320,480);
view = [ [ UIView alloc ] initWithFrame:rect ];
view.backgroundColor = [UIColor blueColor];
[window addSubview:view];
// Override point for customization after application launch
[window makeKeyAndVisible];