How to set Cell Height according to WebView text?
I have a WebView With Custom Cell and i want to set height of both WebView Size as well as Custom Cell Size according to WebView Text.
Text i开发者_如何学Gos display from the HTML File, so every time text size will be difference, so please suggest me how can i done?
You must implement the delegate method webViewDidFinishLoad, where you can get the view's height:
NSString *height = [webView stringByEvaluatingJavaScriptFromString:@"document.body.scrollHeight;"];
Now you can return that height in your cellHeightForRow.
精彩评论