The below problem only occurs on an iOS 6.0/6.1 application running on an iOS 7.0+ device.
So I have a UISearchDisplayController
that searches our API and returns data. This all works, and everything is displayed as we want. The only problem we are seeing is that after the content has populated the searchResultsTableView
, it seems as though when the keyboard is initially hidden, the contentSize
of the searchResultsTableView
is much larger than the data, and actually seems to be the size of the keyboard. When I enter the search bar, and show the keyboard and hit 'Search' again (just to hide the keyboard), the contentSize
then adjusts correctly to only fill the screen, and nothing more. Below is a screen shot of what I am talking about with the initial tableView
population.
The white is the table data, and the gray/cream color is the extra tableView
space.
Any ideas on how to fix this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…