开发者

problem customising navigationController.navigationBar.barStyle

开发者 https://www.devze.com 2023-01-26 16:27 出处:网络
i read thru the whole forum maybe im doing something wrong any help would be great tabController = [[UITabBarController alloc] init];

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]]; //tabCon开发者_如何学Ctroller.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]];


For NavigationController, try:

self.navigationController.navigationBar.barStyle = UIBarStyleBlack;

For a Toolbar, try:

[toolbar setTintColor:[UIColor blackColor]];
0

精彩评论

暂无评论...
验证码 换一张
取 消