I don’t know why this is happening, I have a UISearchBar in my navigation bar, however, when I start scrolling through the SearchResultsTableView, it looks like the search bar is skipping in its position and I get an error warning: [<CALayer: 0x16550840> display]: Ignoring bogus layer size
Here are screenshots of position changes in SearchBar.


It is quite minimal, but very noticeable. Any ideas? Thanks!
Here is the code that I use to customize my search bar
if (!self.cardSearchDisplayController) {
CGFloat searchBarHeight = 64.0;
self.cardSearchBar = [[UISearchBar alloc]initWithFrame:CGRectMake(0, 0, 320, searchBarHeight)];
self.cardSearchBar.delegate = self;
self.cardSearchBar.showsCancelButton = YES;
self.cardSearchDisplayController = [[UISearchDisplayController alloc]initWithSearchBar:self.cardSearchBar contentsController:self];
self.cardSearchDisplayController.delegate = self;
self.cardSearchDisplayController.searchResultsDataSource = self;
self.cardSearchDisplayController.searchResultsDelegate = self;
self.navigationItem.titleView = self.cardSearchDisplayController.searchBar;
self.searchDisplayController.displaysSearchBarInNavigationBar = YES;
}
source
share