Instagram / IGListKit

A data-driven UICollectionView framework for building fast and flexible lists.
https://instagram.github.io/IGListKit/
MIT License
12.87k stars 1.54k forks source link

Is there any kind of persistence support? #317

Closed Ricardo1980 closed 7 years ago

Ricardo1980 commented 7 years ago

New issue checklist

General information

I downloaded and played with the sample code, and read docs about this library, but I don't see anything about persistence. Evidently Instagram has it, because when I open it in airplane mode, I can see different cells. Any doc or clue about persistence when using this library? Thanks a lot.

rnystrom commented 7 years ago

@Ricardo1980 within Instagram we mostly just use NSCoding for everything. IGListKit doesn't have any part in persistence layers for data. Instead I'd recommend loading cached content from disk on startup, then replace it with network data when it comes in.

IGListKit makes this easy because you don't have to differentiate between cached and network content, and when data changes just call adapter.performUpdates(animated: false).