I am using the following piece of code to hide the background on a UISearchBar: [[searchView.subviews objectAtIndex:0] setHidden:YES]; Pretty simple, but I worry about hard coding a position in a subview list. So I went looking for the UISearchBarBackground.h file and cannot find it. Does any know where the definition is hiding?
A:
To simply use in [subView isKindOfClass:[UISearchBarBackground class]] the following works just fine:
@interface UISearchBarBackground : NSObject { } @end
A more complete definition is available at github.
Jim B
2010-04-28 17:46:25
where on github?
Brandon
2010-07-06 12:11:49
http://github.com/kennytm/iphone-private-frameworks/blob/master/UIKit/UISearchBarBackground.h
Jim B
2010-07-07 18:17:13
A:
For ios4 it didnt work, so I try this and it works
[[self.mySearchBar.subviews objectAtIndex:0] removeFromSuperview];
Adeem Maqsood Basraa
2010-07-09 10:05:05