如何搜索UITableView [英] How to search a UITableView

查看:74
本文介绍了如何搜索UITableView的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是的,所以我知道关于这个主题的SO有大约10亿个问题,但它们似乎都链接到关于实现UISearchBar或Apple文档的相同的旧博客文章。我想知道的是,是否有适当的教程来实现UISearchDisplayController类来搜索数组/字典并更新基于它的UITableView?

Right so I know there are about a billion questions on SO about this subject, but they all appear to link to the same old blog posts about implementing a UISearchBar, or Apple docs. What I want to know is, is there a proper tutorial out there for implementing the UISearchDisplayController class to search through either an array/dictionary and update a UITableView based on that?

我已经关注了关于这个主题的大约10种不同的教程变体,但没有一种产生预期的结果。有些教程只是向您展示一行代码,并希望您能够弄清楚,所以我只是想知道是否有一个教程,一步一步地如何在iOS应用程序中实现搜索功能?

I've followed about 10 different variations of tutorial on this topic and none of them yield the expected result. Some tutorials simply show you one line of code and expect you to figure it out, so all I'm asking if is there a tutorial out there which goes through step by step how to to implement search functionality within an iOS app?

哎呀,如果我弄清楚最终我可能会自己写一个教程!

Heck if I figure this out eventually I might write a tutorial myself!

先谢谢你们。

推荐答案

检查博客帖子并尝试了解他们的使用方式,可能是,您需要修改以符合要求,假设文章绰绰有余地理解和使用 UISearchDisplayController

Check the blogs post and try to understand how they have used,May be,you would require to modify to fit under requirement,Assume the articles are more than sufficient to understand and using UISearchDisplayController .

iPhone / iPad UISearchBar和UISearchDisplayController异步示例

使用UISearchDisplayController可取消异步搜索

UISearchDisplayerController的简单教程

这篇关于如何搜索UITableView的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆