title: How to determinate stringByEvaluatingJavaScriptFromString evaluation porcess complete?
body: <p>I'm reading the html file into the <code>UIWebview</code>. In the <code>webViewDidFinishLoad</code> I'm doing javascript function for horizontal scroll. Below code works fine. But i cant predict when javascript function finish.</p>
  
  <p>in the visible webview first load the html file then script run. so i can determinate javascript finishing in the <code>webViewDidFinishLoad</code>. </p>
  
  <pre><code>- (void)webViewDidFinishLoad:(UIWebView *)webView
  {
  
      NSString *scriptString =@"javascript:function initialize() {  var eelam = document.getElementsByTagName('body')[0]; var ourH = window.innerHeight;var ourW = window.innerWidth;  var fullH = eelam.offsetHeight;  var pageCount = Math.ceil(fullH/ourH)+1; var padval = parseInt((screen.width*10)/100);var currentPage = 0; var newW = pageCount*ourW;eelam.style.height = (ourH - 30)+'px';eelam.style.width = (newW)+'px';eelam.style.webkitColumnGap = '5px'; eelam.style.margin = '25px'; eelam.style['margin-left']='2px';eelam.style.webkitColumnCount = pageCount; window.interface.setPageCount(pageCount);window.interface.setColumnWidth(screen.width);window.interface.setContent(eelam);window.interface.setColumnGap(padval);};";
  
      // set font
      NSString *jsString = [[NSString alloc] initWithFormat:@"document.getElementsByTagName('body')[0].style.webkitTextSizeAdjust= '%d%%'",
                            textFontSize];
  
      [mywebview stringByEvaluatingJavaScriptFromString:scriptString];
  
      [mywebview stringByEvaluatingJavaScriptFromString:@"javascript:initialize()"];
  
      [mywebview stringByEvaluatingJavaScriptFromString:jsString];
  
      // scroll disable
      UIView* row = nil;
      for(row in webView.subviews){
          if([row isKindOfClass:[UIScrollView class] ]){
              UIScrollView* scrollRow = (UIScrollView*) row;
              scrollRow.scrollEnabled = NO;
              scrollRow.bounces = NO;
              scrollRow.pagingEnabled=YES;
          }
      }
  
  // this code is also not use to handle my issue
  if ([[mywebview stringByEvaluatingJavaScriptFromString:@"document.readyState"] isEqualToString:@"complete"]) {
  
         }
  
  
  }
  </code></pre>
  
  <p>please advise me,</p>
  
  <p>thanks in advance,</p>