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:

https://dl.dropbox.com/u/2795448/screenshots/ot.png

when change data in tableview data source, cell still frozen:

https://dl.dropbox.com/u/2795448/screenshots/ou.png

if put breakpoint , inspect tableview, doesn't frozen cell:

https://dl.dropbox.com/u/2795448/screenshots/ov.png

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

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -