ios - UISearchBar Appearance still shows 1px border when pulled down -


this screenshot while pulling down on table (which pulls search bar away tabs top).

enter image description here

my searchbar customized via appearances api.

that 1px border top remains though i've set background image. varies color depending on 'style' of search bar (in instance have search bar set black opaque).

any idea how rid of it? i've tried setting clear background color, , trying change border color on layer of search bar.

i haven't found clean way, looping through subviews found image view used create line. it's frame (0, -1, 320, 1).

to remove it, test equality , remove:

for (uiview *view in self.searchdisplaycontroller.searchbar.subviews) {     if (cgpointequaltopoint(cgpointmake(0, -1), view.frame.origin) && cgsizeequaltosize(view.frame.size, cgsizemake(self.view.frame.size.width, 1))) {         [view removefromsuperview];         self.searchbarlineremoved = yes;     } } 

Comments

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -