UISearchBar in UITableViewHeader strange animation on iOS 7/8

Viewed 6805

We have a class SearchTableViewController that holds a UISearchBar as the tableViewHeader of its UITableView. We also use a UISearchDisplayController whose delegate (searchResultsDelegate and searchResultsDataSource) is the same controller that holds the tableView containing the searchBar.

Searching itself works just fine, but the animation when entering/exiting search mode is really weird:

Weird animation 1

In another view controller (a subclass of the SearchTableViewController), the issue is even more noticeable:

Weird animation 2

I have tried implementing the various UISearchDisplayDelegate methods (such as -(void)searchDisplayControllerWillBeginSearch:), but they are either being called too late (when the animation is already finished) or only when giving the UISearchBars textfield the focus. Are there any methods I am missing that might allow me to change the animation before it happens? Also, notice how the navigation bar immediately disappears in the first video. I have tried manually setting it to 'not hidden' in multiple spots, which didn't change anything.

Our navigationBar is configured to not be translucent, if that makes any difference. On iOS 6, everything works as expected, the searchBar smoothly pushes the navigationBar upwards.

Will post code if necessary, but we are not modifying the standard behaviour in any way (setting frames, overwriting delegate methods etc.).

Any ideas what might be the cause for the strange animations?

2 Answers
Related