Para mí las siguientes obras excelentes:
iniciado los controladores en appDelegateDidFinishLaunching:
Método:
UINavigationController *navContr1;
UINavigationController *navContr2;
UIViewController *viewController1, *viewController2;
viewController1 = [[[FirstViewController alloc] initWithNibName:@"FirstViewController_iPhone" bundle:nil] autorelease];
viewController2 = [[[SecondViewController alloc] initWithNibName:@"SecondViewController_iPhone" bundle:nil] autorelease];
navContr1 = [[[UINavigationController alloc] initWithRootViewController:viewController1] autorelease];
navContr2 = [[[UINavigationController alloc] initWithRootViewController:viewController2] autorelease];
self.tabBarController = [[[UITabBarController alloc] init] autorelease];
//self.tabBarController.viewControllers = [NSArray arrayWithObjects:viewController1, viewController2, nil];
self.tabBarController.viewControllers = [NSArray arrayWithObjects:navContr1, navContr2, nil];
self.window.rootViewController = self.tabBarController;
[self.window makeKeyAndVisible];
con este hecho, en sus diferentes viewControllers initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
- método que puede cambiar el título con la siguiente línea:
self.title = @"Your Title";
Buena suerte.
posible duplicar: http://stackoverflow.com/questions/2760634/cocoa-touch-setting-uinavigationcontrollers-title-doesnt-work –
Seguramente debe especificar el título del controlador de vista en el controlador de vista y luego en el controlador de navegación tendrá el título correcto aplicado? – ader
Estoy especificando el título en el controlador de vista. Gracias. Sam. – shoughton123