Guest User

Untitled

a guest
Jun 21st, 2018
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. #import <UIKit/UIKit.h>
  2.  
  3. int main(int argc, char *argv[]) {
  4.  
  5. NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
  6. int retVal = UIApplicationMain(argc, argv, @"UIApplication", @"AppDel");
  7. [pool release];
  8. return retVal;
  9. }
  10.  
  11. //------------------------------------------------------------------------------
  12.  
  13. @interface AppDel : NSObject<UIApplicationDelegate> {
  14. UIWindow* window;
  15. UIViewController* masterController;
  16. UIViewController* __self;
  17. }
  18. @end
  19. @implementation AppDel
  20. -(void)applicationDidFinishLaunching:(UIApplication*)app {
  21. window.backgroundColor = [UIColor whiteColor];
  22. window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].applicationFrame];
  23.  
  24. __self = [[UIViewController alloc] init];
  25. __self.view.backgroundColor = [UIColor blueColor];
  26.  
  27. masterController = [[UIViewController alloc] init];
  28. UIView* masterControllerView = masterController.view;
  29. masterControllerView.backgroundColor = [UIColor redColor];
  30. masterControllerView.frame = CGRectMake(16, 56, 300, 300);
  31.  
  32. [window addSubview:masterControllerView];
  33. [window makeKeyAndVisible];
  34.  
  35. [masterController presentModalViewController:__self animated:NO];
  36. }
  37. @end
Add Comment
Please, Sign In to add comment