开发者

UIWebView on UITableViewCell drawing issue

开发者 https://www.devze.com 2023-01-24 19:32 出处:网络
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 scrolli

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/

0

精彩评论

暂无评论...
验证码 换一张
取 消