views:

38

answers:

1

hi,

i have a uitableview which will load a uiwebview with a long page (static page inside the app). I want to know whether it is possible to move to the center of the page on clicking the cell in the uitableview. Something very similar to using hyperlinks to point to different location of same HTML page.

A: 

My javascript may be off, but you can use stringByEvaluatingJavaScriptFromString to manipulate the UIWebView content. Do something like this when the cell is selected:

[webView stringByEvaluatingJavaScriptFromString:@"window.scrollTo( 0 , window.innerHeight/2 );"];
drawnonward
is there a way to pinpoint the exact location ?? say heading b or heading a ??
thndrkiss
Got it !http://stackoverflow.com/questions/68165/javascript-to-scroll-long-page-to-div/2368393#2368393
thndrkiss