UiTableView Lazy Loading
consider using iOS core data to store datas
LazyTableImages sample code
You want to arrange your code to grab all the data it needs before drawing
the table, so the table can be scrolled comfortably. But that means you've
still got a delay.
There are a few options.
- You could disable the view, and put a spinner to show that it's loading,
while you get the data. Once the data arrives, you could then display the
view, including table.
- If the table is only part of the view, you could display the table
instantly, with 0 rows, so it's an empty table. The user can start clicking
around at other things, while the data downloads, and once the data arrives
you could then redraw the table appropriately.
- Or you can just have the delay before things load, and let the app be a
little non-responsive. Not ideal, but hey, it might be the easiest option to
get your app built and released. Then you can worry about responsiveness
later.
LazyTableImages sample code
You want to arrange your code to grab all the data it needs before drawing
the table, so the table can be scrolled comfortably. But that means you've
still got a delay.
There are a few options.
- You could disable the view, and put a spinner to show that it's loading,
while you get the data. Once the data arrives, you could then display the
view, including table.
- If the table is only part of the view, you could display the table
instantly, with 0 rows, so it's an empty table. The user can start clicking
around at other things, while the data downloads, and once the data arrives
you could then redraw the table appropriately.
- Or you can just have the delay before things load, and let the app be a
little non-responsive. Not ideal, but hey, it might be the easiest option to
get your app built and released. Then you can worry about responsiveness
later.
沒有留言:
張貼留言