简体   繁体   中英

IOS: UITableView with search: displayController not selectable?

I'm a newbie trying to create a simple sample app that takes json data from a website and list it on a UITableView .

Each voice in the UITableView is clickable to show more details.

I started from this example/app because it was clean and working:

http://nscookbook.com/2013/12/ios-programming-recipe-16-2-populating-a-uitableview-with-data-from-the-web-ios-7-and-afnetworking-2-0/

What I was missing was a searching function, so following this other page and adapting code I got it working:

http://www.appcoda.com/search-bar-tutorial-ios7/

The only problem I have is that when I search for something I get correct results filtered, but the list of results it's not clickable (to go to the details view/page) and it does not contain the small 'Rating' subtext.

Basically the filtered list only gets the 'Name' and nothing else of the original array, and the cells are not clickable.

What am I missing?

I solved eventually the issue using a SearchBar without its own display view, so basically refreshing the main tableview (already configured to show all details) if/when something is searched.

The search simply filter the main array and in all functions to display the result I show either the main array or the filtered one.

Thanks!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM