自定义navigationController.navigationBar.barStyle的问题

时间:2010-11-23 01:10:09

标签: iphone navigationcontroller navigationbar

我通过整个论坛阅读也许我做错了什么 任何帮助都会很棒

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],       零]];  //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]];

1 个答案:

答案 0 :(得分:0)

对于NavigationController,请尝试:

self.navigationController.navigationBar.barStyle = UIBarStyleBlack;

对于工具栏,请尝试:

[toolbar setTintColor:[UIColor blackColor]];