UIWebView on UITableViewCell drawing issue
I'm using web view o开发者_Go百科n table view cell to display formatted text. But web view displays content just after scrollDidEndDecelerating event, so web view is empty while table view is scrolling. I tried to call [cell setNeedsDisplay] on scrollDidScroll delegate event, but web view still empty. It looks ugly. Does anybody know any solution of this issue?
Thanks a lot,
Mitya
try overriding the -(void)drawRect
to render the text for the UITableViewCell
using methods like drawAtPoint:withFont
, drawInRect:withFont:
and others. Then when the tableView scrolling ends, display your webview as normal. For more information, try:
http://nickharris.wordpress.com/2010/06/17/fast-uitableviewcell-with-a-uiwebview/
精彩评论