ios - UITableViewCell selection flickers on reload -


i have uitableview have hooked nsfetchedresultscontroller. when object updated, use reloadrowsatindexpaths reload cell. want keep cell selected while reloaded. below code how reselecting cell after update. works, cell displays unselected half second before becoming selected again , looks bad. self.selectedindexpath set in didselectrowatindexpath.

i've tried setting cell selected , highlighted in cellforrowatindexpath, did nothing.

does know how prevent flickering? i'm using ios 8.3 btw.

// called in controllerwillchangecontent [self.tableview beginupdates];  ...  // called in didchangeobject [self.tableview reloadrowsatindexpaths:[nsarray arraywithobject:indexpath] withrowanimation:uitableviewrowanimationnone];  ...  // called in controllerdidchangecontent [self.tableview endupdates];  if( self.selectedindexpath ) {         [self.tableview selectrowatindexpath:self.selectedindexpath animated:no scrollposition:uitableviewscrollpositionnone]; } 


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -