Skip to content

Instantly share code, notes, and snippets.

@alexeckermann
Created January 12, 2011 08:00
Show Gist options
  • Save alexeckermann/775841 to your computer and use it in GitHub Desktop.
Save alexeckermann/775841 to your computer and use it in GitHub Desktop.
Before and after going XIB-less
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, @"UIApplication", @"LapTimerAppDelegate");
[pool release];
return retVal;
}
// LapTimer is the name of this project.
// Change that part to what your App Delegate file is called.
@implementation LapTimerAppDelegate
@synthesize window, myViewController;
- (void)applicationDidFinishLaunching:(UIApplication *)application {
window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
// ... creation of view controllers for the window ...
[window addSubview: [self.myViewController view]];
[window makeKeyAndVisible];
}
// ... other App Delegate code ...
@end
#import <UIKit/UIKit.h>
int main(int argc, char *argv[]) {
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
int retVal = UIApplicationMain(argc, argv, nil, nil);
[pool release];
return retVal;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment