iphone - UITableViewCell is frozen (not rerendering with new data). How to fix? -
having issues tableviewcell freezing. have table view cell list of exercises. when add new exercise on viewcontroller, pop tableviewcontroller lists exercises, respective cell gets frozen (see screenshot). then, if call [self.tablecell reloaddata]
, cell never refreshes.
it's weird because if offending cell is, say, index #4, , change data source have 2 items, 4th cell still frozen. (the first 2 render correctly, 3rd blank, 4th offending cell)
list of exercises:
when change data in tableview data source, cell still frozen:
if put breakpoint , inspect tableview, doesn't frozen cell:
not sure go here :( seems happen when insert row different viewcontroller pop one.
any thoughts? so help!
you keeping reference cell. bad idea. contradicts whole pattern of datasource , recycling of table cells. kinds of wacky bugs inevitable result.
instead, should make sure datasource methods return correct number of sections , rows, , appropriate cells , reload table not cell.
[self.tableview reloaddata];
so, example, when view returning adding new item, make sure data array using updated , reload.
Comments
Post a Comment