我用的是searchbar 并且在页面上直接显示搜索出来的答案,把searchbar的背景色换掉后会有两条线
UIImageView *barImageView = [[[_XJSearchBar.subviews firstObject] subviews] firstObject];
barImageView.layer.borderColor = [UIColor colorWithRed:245.0/255.0 green:245.0/255.0 blue:245.0/255.0 alpha:1.0].CGColor;
barImageView.layer.borderWidth=1;
把这个颜色换成你想要的颜色就OK
网友评论