iphone - How to adjust webview inside a parent scrollview? -


i have scrollview within adding textviews, imageviews , uiwebview. able dynamically adjust height of these views except uiwebview.

i have turned off scrolling of uiwebview, , want resize webview according content. , @ same time resize scrollview according resized webview.

the scrollview should contain resized webview. think there discussion , around haven't been able reach concrete solution. appreciated.

here can try

after have loaded content in uiwebview can use it's stringbyevaluatingjavascriptfromstring: method ask html document height. little tricky should work.

you can this:

nsinteger height = [[webview stringbyevaluatingjavascriptfromstring:     @"document.body.scrollheight"] integervalue]; 

the scrollheight mught not best. have couple of options. experiment document properties mentioned in http://james.padolsey.com/javascript/get-document-height-cross-browser/

after u can resize scrollview content,

this method seems working, till now. good- luck


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -