Guest User

Untitled

a guest
Jan 18th, 2019
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
  2. {
  3. sReg = @"no";
  4. [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
  5. self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
  6.  
  7.  
  8. // Override point for customization after application launch.
  9. UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
  10. UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
  11. UIViewController *viewController3 = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil];
  12. UIViewController *viewController4 = [[FourthViewController alloc]initWithNibName:@"FourthViewController" bundle:nil];
  13. UIViewController *viewController5 = [[FifthViewController alloc]initWithNibName:@"FifthViewController" bundle:nil];
  14.  
  15.  
  16.  
  17. self.tabBarController=[[UITabBarController alloc] init];
  18.  
  19. self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, viewController3, viewController4,viewController5, nil];
  20. self.window.rootViewController = self.tabBarController;
  21. [self.window makeKeyAndVisible];
  22. return YES;
  23. }
  24.  
  25. this one of my view controller(FirstViewController):
  26. - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
  27. {
  28. self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
  29. if (self)
  30. {
  31.  
  32. self.title=NSLocalizedString(@"Magnum", @"first");
  33. self.tabBarItem.image=[UIImage imageNamed:@"magnum"];
  34.  
  35. }
  36. return self;
  37. }
Add Comment
Please, Sign In to add comment