开发者

Add an index or text search to iPhone Application?

Hi all,

I'm trying to write my first iphone app and I have the following problem. My app has a table that is populated from a sqlite database which has just over 1400 records. I would like to add a text search or index (ie A, B, C etc down the right side) to make searching earier for the user.

I found some tuts that will help me but not of them explain have to do it with the sqli开发者_StackOverflow中文版te records. If someone could help be pointing me in the right direction that would be appriecated.

Thanks in Advance.


There are like two options for you

  1. You can create a query for each type with the search criteria and get the data from DB and populate easily.(This will take much time as you have 1400 records)
  2. You can fetch the whole 1400 records and store it an object or array. Then you can search in the array when you type. (I prefer you this)

For fetching data from SQLIte see this http://blog.webscale.co.in/?p=205

For searching in tableview see this http://blog.webscale.co.in/?p=228

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜