I have a UISearchDisplayController that works perfectly in one of my iOS6 app. Now, I want to migrate this app to iOS7.
I had read the Apple docs, and it says the following :
Starting in iOS 7.0, you can use a search display
controller with a navigation bar (an instance of
the UINavigationBar class) by configuring the
search display controller’s displaysSearchBarInNavigationBar
and navigationItem properties.
displaysSearchBarInNavigationBar is pretty easy to set up. But the only clue I have for navigationItem is the following :
Important: The system raises an exception if you
attempt to set the titleView property for a search
display controller’s navigation item.
I can't seem to find example of how to set the navigationItem. How to I say to my navigationBar to embed my searchBar? Somebody can show me an example?
Thank you in advance!