Guest User

Untitled

a guest
Jul 20th, 2018
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.90 KB | None | 0 0
  1. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  2. {
  3.  
  4. RootViewController * rootViewController = [[RootViewController alloc] initWithNibName:@"RootViewController" bundle:nil];
  5. UINavigationController *navigationController = [[UINavigationController alloc] initWithRootViewController:rootViewController];
  6.  
  7. UIBarButtonItem *next = [[UIBarButtonItem alloc] initWithTitle:@"Next" style:UIBarButtonItemStyleDone target:nil action:nil];
  8. navigationController.title = @"Foo";
  9.  
  10. navigationController.navigationItem.rightBarButtonItem = next;
  11.  
  12. [self.window addSubview:navigationController.view];
  13.  
  14. // Override point for customization after application launch.
  15. [self.window makeKeyAndVisible];
  16. return YES;
  17.  
  18.  
  19. }
  20.  
  21. navigationController.navigationItem.rightBarButtonItem = next;
  22.  
  23. rootViewController.navigationItem.rightBarButtonItem = next;
Add Comment
Please, Sign In to add comment