Store UITableViewController Section Array

Discussion in 'iOS Programming' started by lng, Apr 30, 2011.

  1. lng
    macrumors newbie

    Jul 19, 2010
    Hi all, i have SQLite table where my records stays as:

    To be able to display them on sectioned UITableViewController, i query the first letters from these records and create an array with them. Then for each letter in the array, i again query table and get each records starting with that letter. I guess you got the idea.

    Since i do these operations in the app, it takes quite time (3-4 seconds) and app pauses in those seconds. I was curious if i can create those arrays and store somehow in the system. I can re-create them when i update the data time to time.

    Thanks a lot in advance..
  2. macrumors 68030


    Sep 2, 2008
    You can of course save them, either in your database or as plist files.

    You should think about how you can make your database more efficient. For instance if you have a section column or firstLetter column in your database table with an index on the column then this step would be faster.

Share This Page