ios - Using CoreData to save user articles - how do I have all the articles persist in the UITableView? -
i'm still new coredata, feel i've got understanding of saving , retrieval process. however, i'm confused when retrieving how make "seamless", never left (maybe never , i'm not understanding).
my uitableview's model nsarray
full of article
objects. list populated articles.
after every new article added, save coredata store, if app crashes or have you, have saved. however, how have instantly there when user reopens it, if quit after being in background?
i can fill nsarray of articles contents of core data, takes bit, , tableview data source has populate tableview it, hardly instant.
is there way make data source uitableview coredata? maybe i'm misunderstanding.
yes, it's quite easy create core data-backed tableview controller. matter of fact if create brand new project , check "use core data" checkbox set automatically.
the magic comes using nsfetchedresultscontroller
populate table. ray has great tutorial here.
basically core data acts datasource table view, handing correct record when needs displayed.
Comments
Post a Comment