I have a UITableView with many rows, each row contains a UIWebView. The contents of this webView are stored in my database (in the application), and the height of each cell in the View table is calculated based on the scroll height of my UIWebView.
Here's the problem: the loadHtmlString
method works asynchronously, so when you call the heighForRowAtIndexPath
UITableView method, data is not loaded into the UIWebView (because it works asynchronously). Therefore, I cannot calculate the required height for the cell.
So here is the question, is it possible to synchronously load the contents of a UIWebView? my html text is very short, so it shouldnโt have to load it synchronously for so long.
EDIT: Is it possible to calculate the expected height of an html string without putting it in a UIWebView, I know that this is possible using plain text, I don't know about html
source share