在iphone中推进搜索实现? [英] Advance search implementation in iphone?

查看:127
本文介绍了在iphone中推进搜索实现?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想实现高级搜索功能,以便在搜索栏中输入特定文本时,应根据搜索过滤UITableview中的内容列表,然后突出显示搜索文本?
请给我一些想法?

I want to implement advance search functionality so that if a particular text is typed in search bar, the list of contents in UITableview should be filtered based on the search and then the search text occurances should be highlighted? Please give me some ideas?

推荐答案

使用NSAttributedString ...查找绘制NSAttribute String的UIControllers因为UILabel,UITextView不支持NSAttributedString ...

Use NSAttributedString... Find UIControllers that draw NSAttribute String because UILabel,UITextView doesnot support NSAttributedString...

在此获取控制器: https://github.com/AliSoftware/Ali-Cocoa-Classes/tree/master/OHAttributedLabel

PS:如果您计划分发仅支持iOS6的应用程序,因为UILabel现在支持NSAttributedString,您应该直接使用UILabel而不是OHAttributedLabel,因为它现在已经被操作系统本机支持。

这篇关于在iphone中推进搜索实现?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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