去除导航栏/搜索栏底部的黑线 [英] Remove the dark Line at the bottom of Navigationbar/Searchbar
本文介绍了去除导航栏/搜索栏底部的黑线的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想做一个干净的白色设计.所以,我将tintColor
属性设置为whiteColor
,但是在UINavigationBar
和UISearchBar
下有这些暗线.
I want to make a clean white Design. So, I set the tintColor
property to whiteColor
, but there are these dark Lines under the UINavigationBar
and UISearchBar
.
有人知道如何去除暗线或如何改变颜色吗?
Do some one know, how to remove the dark Lines or how to change the Color?
推荐答案
这就是我所做的,并且似乎有效,它是此链接的进一步发展.我将显式宽度声明更改为动态声明,这样无论您是否更改视图大小,它都会是视图的大小:
This is what I did, and seemed to work, it is a further development of this link. I changed the explicit width declaration to a dynamic one, so that it will be the size of the view if you change view size or not:
UIView *overlayView = [[UIView alloc] initWithFrame:CGRectMake(0, 43, self.view.frame.size.width, 1)];
[overlayView setBackgroundColor:[UIColor whiteColor]];
[navBar addSubview:overlayView]; // navBar is your UINavigationBar instance
[overlayView release];
我在这里找到了东西:如何移除UINavigatonItem的边框线
这篇关于去除导航栏/搜索栏底部的黑线的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文