Trying to force redraw of UITableViewCell

Posted by Suresh on Stack Overflow See other posts from Stack Overflow or by Suresh
Published on 2010-04-24T17:12:34Z Indexed on 2010/04/25 7:43 UTC
Read the original article Hit count: 494

I found this post on Beveled UITableViewCells from http://news.selectstartstudios.com/beveled-uitableviewcells/. I'm using the technique to reduce the width of the cells, and for the most part it works great.

However, I have a small problem. Sometimes the cells are not redrawn properly. For example, even though a cell is supposed to be a "middle" cell, it is drawn as a "top" cell: yfrog.com/f1screenshot20100424at100

How can I fix this?

I have tried forcing the cell to redraw via [cell setNeedsDisplay], [cell setNeedsLayout], [tableView reloadRowAtIndexPath:withAnimation:], [cell drawrect:], and [tableView drawRect:atIndexPath]. I am out of ideas.

Thanks again!

© Stack Overflow or respective owner

Related posts about uitableviewcell

Related posts about iphone-sdk