Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
- {
- sReg = @"no";
- [[UIApplication sharedApplication] registerForRemoteNotificationTypes:(UIRemoteNotificationTypeAlert | UIRemoteNotificationTypeBadge | UIRemoteNotificationTypeSound)];
- self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
- // Override point for customization after application launch.
- UIViewController *viewController1 = [[FirstViewController alloc] initWithNibName:@"FirstViewController" bundle:nil];
- UIViewController *viewController2 = [[SecondViewController alloc] initWithNibName:@"SecondViewController" bundle:nil];
- UIViewController *viewController3 = [[ThirdViewController alloc] initWithNibName:@"ThirdViewController" bundle:nil];
- UIViewController *viewController4 = [[FourthViewController alloc]initWithNibName:@"FourthViewController" bundle:nil];
- UIViewController *viewController5 = [[FifthViewController alloc]initWithNibName:@"FifthViewController" bundle:nil];
- self.tabBarController=[[UITabBarController alloc] init];
- self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, viewController3, viewController4,viewController5, nil];
- self.window.rootViewController = self.tabBarController;
- [self.window makeKeyAndVisible];
- return YES;
- }
- this one of my view controller(FirstViewController):
- - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- {
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self)
- {
- self.title=NSLocalizedString(@"Magnum", @"first");
- self.tabBarItem.image=[UIImage imageNamed:@"magnum"];
- }
- return self;
- }
Add Comment
Please, Sign In to add comment