2010-11-23 21 views
0

我读通整个论坛也许我做错了什么 任何帮助将是巨大的问题定制navigationController.navigationBar.barStyle

tabController = [[的UITabBarController页头] INIT]; tabController.delegate = self; [tabController setViewControllers: [NSArray的arrayWithObjects: // [[[UINavigationController的页头] initWithRootViewController:[[[SearchTableViewController的alloc] INIT]自动释放]自动释放], // [[[UINavigationController的页头] initWithRootViewController:[[[SearchPhotosViewController我们可以通过下面的代码来实现:[UINavigationController alloc] initWithRootViewController:[[[SearchPhotosViewController alloc] init] autorelease] autorelease], // [[[[UINavigationController alloc] initWithRootViewController:[[[SearchPhotosViewController2分配]初始化] autorelease]] autorelease], [[[UINavigationController alloc] initWithRootViewController:[[[crap2 alloc] init] autorelease]] autorelease], [[[UINavigationController alloc] in itWithRootViewController:[[[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]];

回答

0

对于NavigationController,尝试:

self.navigationController.navigationBar.barStyle = UIBarStyleBlack; 

对于工具栏,请尝试:

[toolbar setTintColor:[UIColor blackColor]]; 
+0

我已经试过了。我得到 请求成员'navigationController'在某些不是结构或联盟 ive也试过它在个人m文件中: self.navigationController.navigationBar.barStyle = UIBarStyleBlackOpaque; 但不幸的是没有任何反应 – geckus 2010-11-23 03:31:45