Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- - (IBAction)tab1Click:(id)sender {
- myTabBarController = [[UITabBarController alloc] init];
- view2Controller = [[View2Controller alloc] init];
- [view2Controller setTitle:@"title"];
- view3Controller = [[View3Controller alloc] init];
- deneme = [[ViewController alloc] init];
- myTabBarController.viewControllers = [NSArray arrayWithObjects:deneme, view2Controller,view3Controller, nil];
- [self.view addSubview:myTabBarController.view];
- myTabBarController.selectedIndex=1;
- }
- [[self.tabBarController.tabBar.items objectAtIndex:0] setTitle:NSLocalizedString(@"BotonMapas", @"comment")];
- [[self.tabBarController.tabBar.items objectAtIndex:1] setTitle:NSLocalizedString(@"BotonRA", @"comment")];
- [[self.tabBarController.tabBar.items objectAtIndex:2] setTitle:NSLocalizedString(@"BotonEstado", @"comment")];
- [[self.tabBarController.tabBar.items objectAtIndex:3] setTitle:NSLocalizedString(@"LabelInfo", @"comment")];
- // set tab title
- self.title = @"Tab Title";
- // optionally, set different title for navigation controller
- self.navigationItem.title = @"Nav Title";
- // Note: self.title will reset Nav Title. Use it first if you want different titles
- UITabBarItem *item2 = [[UITabBarItem alloc initWithTitle:@"someTitle" image:someImage tag:0];
- viewController2.tabBarItem = item2;
- [view2Controller setTitle:@"ImATitle"];
- UINavigationController *nav1 = [[UINavigationController alloc] init];
- myViewController *myView = [[myViewController alloc] init];
- //myView.title = @"Title"; //prob not needed
- [nav1 pushViewController: myView animated:NO];
- UITabBarItem *item = [[UITabBarItem alloc] initWithTitle:@"Title" image:[UIImage imageNamed:@"title.png"] tag:0];
- nav1.tabBarItem = item;
- UITabBarController *tbc = [[UITabBarController alloc] init];
- tbc.viewControllers = [NSArray arrayWithObjects:nav1, nil];
- - (IBAction)tab1Click:(id)sender {
- myTabBarController = [[UITabBarController alloc] init];
- myTabBarController.delegate = self;
- view2Controller = [[View2Controller alloc] init];
- [view2Controller setTitle:@"title"];
- view3Controller = [[View3Controller alloc] init];
- deneme = [[ViewController alloc] init];
- dename.title = @"Dename";
- view2Conreoller.title = @"View2";
- view3Conreoller.title = @"View3";
- myTabBarController.viewControllers = [NSArray arrayWithObjects:deneme, view2Controller,view3Controller, nil];
- [self.view addSubview:myTabBarController.view];
- myTabBarController.selectedIndex=1;
- }
- view2Controller.tabBarItem.image = [UIImage imageNamed:@"misle.png"];
- [(UIViewController *)[tabBarController.viewControllers objectAtIndex:Index] setTitle:@"Title"];
- UITabBarItem *tabItem = [[[tabBarController tabBar] items] objectAtIndex:INDEX];
- [tabItem setTitle:@"TITLEe"];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement