I am not able to clear search bar I have tried to make it clear by setting its background color clear and I have also placed one image under searchbar
I have also ma
Subclass the uisearchbar and override initWithFrame and initWithCoder method and set the background color as
// For searchbar created programmatically
- (id)initWithCoder:(NSCoder *)aDecoder
{
self = [super initWithCoder:aDecoder];
if (self) {
[self configureSetup];
}
return self;
}
// For search bar created on xib
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
if (self) {
[self configureSetup];
}
return self;
}
- (void)configureSetup
{
self.backgroundColor = [UIColor clearColor];
}
and use the subclassed searchbar instead in place where you specified UISearchBar