Answer the question
In order to leave comments, you need to log in
How to pass data from sqlite database to UITableViewController?
Good afternoon!
The task is to rewrite the application from Android to iOS. I'm having a hard time mastering enemy technologies :)
It is necessary to display data in a UITableViewController from a Sqlite database. All the examples that I have found load the entire table into memory:
items = [[NSMutableArray alloc] init];
…………
while (sqlite3_step(statement) == SQLITE_ROW) {
…………
[items addObject:obj];
}
Answer the question
In order to leave comments, you need to log in
in sql query use offset and limit and thus load page by page.
Uploaded 20 records. If the user has scrolled to 15, shift offset by 20 , load the "next page"
Optionally unload the previous one (maybe look towards didReceiveMemmoryWarning)
this is a sql query setting, or you can get 10 records from a page.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question