Advertisement
Guest User

Untitled

a guest
Mar 2nd, 2015
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. @property (strong, nonatomic) UINavigationController *navController;
  2.  
  3. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  4. {
  5. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  6. // Override point for customization after application launch.
  7. frstVwCntlr = [[firstViewController alloc] initWithNibName:@"firstViewController" bundle:nil];
  8. self.navController = [[UINavigationController alloc] initWithRootViewController:self.frstVwCntlr];
  9. self.window.rootViewController = self.navController;
  10. self.window.backgroundColor = [UIColor whiteColor];
  11. [self.window makeKeyAndVisible];
  12. return YES;
  13. }
  14.  
  15. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  16. {
  17.  
  18. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  19. self.window.backgroundColor=[UIColor clearColor];
  20.  
  21. self.viewController = [[YourFirstViewController alloc] initWithNibName:@"YourFirstViewController" bundle:nil];
  22. UINavigationController *navController=[[UINavigationController alloc]initWithRootViewController:self.viewController];
  23. self.window.rootViewController = navController;
  24. [self.window makeKeyAndVisible];
  25.  
  26. // Override point for customization after application launch.
  27. return YES;
  28. }
  29.  
  30. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  31. {
  32.  
  33. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  34. self.window.backgroundColor=[UIColor clearColor];
  35.  
  36. self.viewController = [[YourViewControllername alloc] initWithNibName:@"YourViewControllername" bundle:nil];
  37. UINavigationController *navController=[[UINavigationController alloc]initWithRootViewController:self.viewController];
  38. self.window.rootViewController = navController;
  39. [self.window makeKeyAndVisible];
  40.  
  41. // Override point for customization after application launch.
  42. return YES;
  43. }
  44.  
  45. UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
  46. ImageViewController2 *dealVC = (ImageViewController2 *)[storyboard instantiateViewControllerWithIdentifier:@"ImageViewController2"];
  47. [self.navigationController pushViewController:dealVC animated:YES];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement