0

i read thru the whole forum maybe im doing something wrong any help would be great

tabController = [[UITabBarController alloc] init]; tabController.delegate = self; [tabController setViewControllers: [NSArray arrayWithObjects: //[[[UINavigationController alloc] initWithRootViewController:[[[SearchTableViewController alloc] init] autorelease]] autorelease], //[[[UINavigationController alloc] initWithRootViewController:[[[SearchPhotosViewController alloc] init] autorelease]] autorelease], //[[[UINavigationController alloc] initWithRootViewController:[[[SearchPhotosViewController alloc] init] autorelease]] autorelease], //[[[UINavigationController alloc] initWithRootViewController:[[[SearchPhotosViewController2 alloc] init] autorelease]] autorelease], [[[UINavigationController alloc] initWithRootViewController:[[[crap2 alloc] init] autorelease]] autorelease], [[[UINavigationController alloc] initWithRootViewController:[[[crap3 alloc] init] autorelease]] autorelease], [[[UINavigationController alloc] initWithRootViewController:[[[crap alloc] init] autorelease]] autorelease], nil]]; //tabController.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent;

//tabController.navigationController.navigationBar.barStyle = UIBarStyleBlack; //tabController.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; //tabController.navigationController.navigationBar.barStyle = UIBarStyleBlackTranslucent; tabController.navigationController.navigationBar.barStyle = UIBarStyleBlack; [window addSubview:[tabController view]];

skaffman
  • 398,947
  • 96
  • 818
  • 769
geckus
  • 1
  • 4

1 Answers1

0

For NavigationController, try:

self.navigationController.navigationBar.barStyle = UIBarStyleBlack;

For a Toolbar, try:

[toolbar setTintColor:[UIColor blackColor]];
WrightsCS
  • 50,551
  • 22
  • 134
  • 186
  • i have tried that. i get request for member 'navigationController' in something not a structure or union ive also tried it in the individual m files: self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; but unfortunately nothing happens – geckus Nov 23 '10 at 03:31
  • Are you sure that you don't have a toolbar instead of a navcontroller? – WrightsCS Nov 23 '10 at 03:52
  • Hmmmm... If I do, then how do I change that to black? – geckus Nov 23 '10 at 06:56
  • See edited answer. And if all else fails, create a XIB and edit your toolbar in Interface Builder. – WrightsCS Nov 23 '10 at 07:14
  • i am currently using a xib, when i add a navigationbar i get 2 navigation bars, one on top of the other. im pretty sure its some kind of navigationbar i actually init it at m file - (id)init { if ((self = [super init])) { self.tabBarItem.image = [UIImage imageNamed:@"blah.png"]; self.title = @"blah"; } return self; } so its beginning to confuse me. – geckus Nov 23 '10 at 07:54
  • anyone who can help i will be very very grateful, sample project at http://www.geckus.com/geckus_files.zip still have the problem of changing the navigation style or colour. – geckus Nov 25 '10 at 14:47