Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.16 KB | None | 0 0
  1. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  2. {
  3. self.storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
  4. self.viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"AddViewController"];
  5. self.navigationController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
  6. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  7. [self.window setRootViewController:self.viewController];
  8. [self.window addSubview:self.navigationController.view];
  9. [self.window makeKeyAndVisible];
  10.  
  11. return YES;
  12. }
  13.  
  14. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  15. {
  16. self.storyboard = [UIStoryboard storyboardWithName:@"Main" bundle:nil];
  17. self.viewController = [self.storyboard instantiateViewControllerWithIdentifier:@"AddViewController"];
  18. self.navigationController = [[UINavigationController alloc] initWithRootViewController:self.viewController];
  19. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  20. [self.window setRootViewController:self.navigationController];
  21.  
  22. [self.window makeKeyAndVisible];
  23.  
  24. return YES;
  25. }
  26.  
  27. -(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  28. {
  29. UIStoryboard *storyBord = [UIStoryboard storyboardWithName:@"Main_iPad" bundle:[NSBundle mainBundle]];
  30. self.window.rootViewController = [storyBord instantiateInitialViewController] ;
  31. [self.window makeKeyAndVisible];
  32. return YES;
  33. }
  34.  
  35. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  36. {
  37. UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"yourstoryboardname" bundle: nil];
  38.  
  39. HomeViewController *lvc = [storyboard instantiateViewControllerWithIdentifier:@"youridentifiername"];
  40.  
  41. [(UINavigationController *)self.window.rootViewController pushViewController:lvc animated:NO];
  42.  
  43.  
  44.  
  45.  
  46.  
  47. return YES;
  48. }
  49.  
  50. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  51. {
  52. return YES;
  53. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement