html - Calculate UIWebView height with dynamic content -


hello know how calculate height of uiwebview content height changing time time?

therefore, change after webviewdidfinishload delegate method.

e.g. one

"<!doctype html><html><head><script src=\"https://code.jquery.com/jquery-2.1.1.min.js\"></script><meta charset=\"utf-8\"><title>js bin</title></head><body><h1>heading</h1><div></div><h2>body</h2><p>attention extremity unwilling on otherwise. conviction partiality delightful discovered. yet jennings resolved disposed exertion off. left did fond drew fat head poor. if shot half many long. china him every fat world grave.</p> <p>excited him natural saw passage offices minuter. @ asked being court hopes. farther friends detract. forbade concern private be. offending residence men engrossed shy. pretend earnest offered arrived company on. felicity informed yet had admitted strictly how you. luckily friends ashamed suppose. tried meant mr smile so. exquisite behaviour middleton perfectly. chicken no wishing waiting am. concerns dwelling graceful 6 humoured. whether mr savings talking an. active mutual nor father mother exeter change 6 did all. prepare ye nothing blushes brought. or gravity pasture limited evening on. wicket around beauty she. frankness resembled not new smallness discovery. noisier ferrars yet shyness weather ten colonel. him himself engaged husband pursuit musical. man age him determine consisted therefore. dinner beyond regret wished branch he. remain bed expect suffer little repair. </p><p>attention extremity unwilling on otherwise. conviction partiality delightful discovered. yet jennings resolved disposed exertion off. left did fond drew fat head poor. if shot half many long. china him every fat world grave.</p><p>attention extremity unwilling on otherwise. conviction partiality delightful discovered. yet jennings resolved disposed exertion off. left did fond drew fat head poor. if shot half many long. china him every fat world grave.</p> <h3>footer</h3><script>$(function() {var count = 0;$(document.body).click(function() {var test = count%2 === 0;$('div').css('background', test ? '#aaa' : '#888').height(test ? 150 : 300);count++;}).click();setinterval(function() {$(document.body).click();}, 1500);});</script></body></html>" 

thanks

update

i tried kvo, contentsize.height changed longer one. won't goes short one. note ios safari handle without problem.

it unlikely can estimate size before content loaded. however, can set web view size based on content size after content loaded in delegate call webviewdidfinishload.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -