SearchBar in Navigation Bar not working

蹲街弑〆低调 提交于 2020-01-06 15:18:43

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!