问题
For reference, I'm running the below on an iPad with iOS 7.0.4. The vc is a presented modally as a form page. The search vc is the second vc on the navigation stack.
My table is setup with a search bar and search display controller and is working fine with the search bar located in the header of the table. It returns search results just fine...see image:
!http://www.mcartherstkd.com/images/search.png
I make a one line code change in the vc's viewdidload method to move the search bar to the navigation bar:
searchDisplayController.displaysSearchBarInNavigationBar = YES;
and, while the search continues to work (I can see the search results build via the console) the search results table never updates and I end up with this:
!http://www.mcartherstkd.com/images/searchnotworking.png
I am at a complete loss on this one. I can't see where I'm going wrong...please help!!!
thanks
来源:https://stackoverflow.com/questions/20019608/searchbar-in-navigation-bar-not-working