Cache tableView cell data
In my application, I want to cache the displayed data in tableview so that whenever the application starts or if the internet connection isn't there, my tableview should be able to d开发者_Go百科isplay the cached old data [not completely but say 10 old cached cells].
What I'm displaying in individual cells is an object of one of the 8 classes I'm defining. So in my case I'll have to create 8 tables in order to store these objects.
Can anybody suggest any efficient way of achieving this?
Thanx in advance.
Here is a little hint: Maintain plist(XML) file with NSDictionary as item; just like a info.plist file
Write data to SQLite database and read on start. It is quick, easy and efficient. This might help you: http://www.mobileorchard.com/iphone-sqlite-tutorials-and-libraries/
精彩评论