IOS7 navigatinBar tintColor改变了popover [英] IOS7 navigatinBar tintColor change in popover
本文介绍了IOS7 navigatinBar tintColor改变了popover的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我开发了iPad应用程序。我用导航控制器在popover中打开一些屏幕。但我没有改变IOS 7中的navigationcontroller着色。我该如何改变这种颜色。 thanx
I developed iPad application. I'm opening some screens in popover with navigation controller. But I did not change navigationcontroller tint color in IOS 7. How can I change this color. thanx
UINavigationController *navigationController = [[[UINavigationController alloc] initWithRootViewController:airportsSearch] autorelease];
navigationController.navigationBar.barTintColor = [UIColor blackColor];
navigationController.navigationBar.translucent = NO;
self.popOver=[[UIPopoverController alloc] initWithContentViewController:navigationController];
self.popOver.delegate = self;
[self.popOver setPopoverContentSize:CGSizeMake(285, 370)];
[self.popOver presentPopoverFromRect:tempButton.frame inView:self.view permittedArrowDirections:UIPopoverArrowDirectionLeft animated:YES];
推荐答案
这里神奇的词是 barStyle
,如果你需要黑色,你需要做以下事情:
The magical word here is barStyle
, you need to do the following if you need it black:
navigationController.navigationBar.barStyle = UIBarStyleBlack;
navigationController.navigationBar.translucent = NO;
如果你想改变它的颜色:
And if you want to change its color:
navigationController.navigationBar.barTintColor = [UIColor redColor];
navigationController.navigationBar.barStyle = UIBarStyleBlack;
navigationController.navigationBar.translucent = NO;
这篇关于IOS7 navigatinBar tintColor改变了popover的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文