Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #import <UIKit/UIKit.h>
- int main(int argc, char *argv[]) {
- NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
- int retVal = UIApplicationMain(argc, argv, @"UIApplication", @"AppDel");
- [pool release];
- return retVal;
- }
- //------------------------------------------------------------------------------
- @interface AppDel : NSObject<UIApplicationDelegate> {
- UIWindow* window;
- UIViewController* masterController;
- UIViewController* __self;
- }
- @end
- @implementation AppDel
- -(void)applicationDidFinishLaunching:(UIApplication*)app {
- window.backgroundColor = [UIColor whiteColor];
- window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
- __self = [[UIViewController alloc] init];
- __self.view.backgroundColor = [UIColor blueColor];
- masterController = [[UIViewController alloc] init];
- UIView* masterControllerView = masterController.view;
- masterControllerView.backgroundColor = [UIColor redColor];
- masterControllerView.frame = CGRectMake(16, 56, 300, 300);
- [window addSubview:masterControllerView];
- [window makeKeyAndVisible];
- [masterController presentModalViewController:__self animated:NO];
- }
- @end
Add Comment
Please, Sign In to add comment