UISeachDisplayController showing white box under UISearchBar?

When I click on UISearchBar, a white box appears below it, but on subsequent method calls, the UISearchBarDelegate

white box disappears. It only shows up when the user first clicks on the UISearchBar. Here is the code where I initialize UISearchDisplayController

and UISearchBar

. How do I remove this white border?

- (void)viewDidLoad {

    [super viewDidLoad];

    self.searchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 320, 44)];
    self.searchBar.delegate = self;
    _isSearching = NO;
    self.searchCntrl = [[UISearchDisplayController alloc]initWithSearchBar:self.searchBar contentsController:self];
    self.searchCntrl.delegate = self;
    self.searchCntrl.searchResultsDataSource = self;
    self.searchCntrl.searchResultsDelegate = self;
    self.searchCntrl.displaysSearchBarInNavigationBar = YES;


}

      

enter image description here

+3
ios uisearchbar uisearchdisplaycontroller


source to share


No one has answered this question yet

Check out similar questions:

five
UISearchBar does not accept keyboard input, but does accept Siri input on iOS 6
4
UISearchDisplayController - Overlay Click Called?
3
UISearchbar disappears when in UIScrollView
3
Visibility bar visible behind UISearchBar
2
Custom position for UISearchBar
1
Deviation of UISearchBar
1
Configuring IOS UISearchBar and Search Display
0
UISearchDisplayController does not display lines
0
How to move content under UISearchBar when entering DetailView
-five
Reload subview with animation



All Articles
Loading...
X
Show
Funny
Dev
Pics