去掉 UISearchBar 下的 1px 边框 [英] Remove the 1px border under UISearchBar
本文介绍了去掉 UISearchBar 下的 1px 边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我无法直接删除 UISearchBar 视图下的 1px 边框.现在它看起来与我完成的按钮视图不匹配.我试过了:
I'm having trouble removing that 1px border directly under the UISearchBar view. Now it doesn't look matched up with my done button view. I've tried:
searchBar.layer.borderWidth = 0;
searchBar.layer.shadowOpacity = 0;
但这似乎不起作用.有什么想法吗?
But that doesn't seem to be working. Any ideas?
推荐答案
没关系,我刚做了:
searchBar.layer.borderWidth = 1;
searchBar.layer.borderColor = [[UIColor whiteColor] CGColor];
它有效!
这篇关于去掉 UISearchBar 下的 1px 边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文