UIWebView inside a UITableViewCell

五迷三道 提交于 2019-12-03 21:31:07
Ken Pespisa

I saw this scenario demonstrated once on the iTunesU Stanford iPhone Application Development course. It's shown at the end of lecture 16, from the Spring 2009 sessions

This similar question on SO suggests laying out cells before heightForRowAtIndexPath exits. It would hurt performance for sure, but you could block within that method until the UIWebView is finished loading. Basically loop until the loading property is NO, then return the height of the UIWebView after it is finished.

If you're loading content from the Internet, this might bring your app to a screeching halt, though. If there's any way you can determine the height beforehand, you're better off doing that for performance reasons.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!