fetch - Manually update UITableView (Replace NSFetchedResultsController logic) -


i used combination of queue , resultscontroller update , display coredata objects. got exceptions , problems (see thread nsoperationqueue , nsfetchedresultscontroller). after long research found out nsfetchedresultscontroller problem , decided write own update logic uitableview.

my new strategie is: - when view loads fetch objects core data array , display them - after 20 seconds try load new data web , update core data (inside of second thread / or nsoperation) thread uses own objectcontext... main context ignore changes! - after fetch objects again in temporary array - need update uitableview don't know how... have compare both arrays , update, delete or insert cells..

its important me have nice animations insert , delete. case objects in 1 section!! possible have view "cars" , "hotels" => 2 sections different objects (2 datasource arrays)

can please provide me example updating uitableview.

i used:

- (void)controller:(nsfetchedresultscontroller *)controller didchangeobject:(id)anobject atindexpath:(nsindexpath *)indexpath forchangetype:(nsfetchedresultschangetype)type newindexpath:(nsindexpath *)newindexpath  

i need replace nsfetchedresultscontroller logic.

thank much!

this might simple of answer, have used

[self.tableview reloaddata];   

and stuck - (void)viewwillappear:(bool)animated method.


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -