Using a UISearchDisplayController with UIViewController containment

Viewed 586

I have a UICollectionViewController that has a UISearchBar added as a supplementary view, with a UISearchDisplayController attached to it.

The search display controller works as expected, but when the collection view controller is added as a child to another view controller, the animation of the search bar to the navigation bar stops working. I believe this is the correct behaviour since the collection view controller itself doesn't has a navigation bar attached to it.

How can I force the search display controller to use the navigation bar of its parent view and animate to it?

1 Answers
Related