Skip to content

Instantly share code, notes, and snippets.

@marshluca
Created December 8, 2010 02:02
Show Gist options
  • Save marshluca/732785 to your computer and use it in GitHub Desktop.
Save marshluca/732785 to your computer and use it in GitHub Desktop.
01a - CoreHelloWorld
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, @"SampleAppDelegate");
[pool release];
return retVal;
CGRect rect = [[UIScreen mainScreen] bounds];
NSLog(@"window: %f,%f,%f,%f",rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);
window: 0.000000,0.000000,320.000000,480.000000
CGRect rect = [[UIScreen mainScreen] applicationFrame];
NSLog(@"app: %f,%f,%f,%f",rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);
application: 0.000000,20.000000,320.000000,460.000000
self.title = [[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleName"];
// Provide support for auto-rotation and resizing
contentView.autoresizesSubviews = YES;
contentView.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment