title: UIWebView.hidden and JavaScript
body: <ol>
  <li>I hide webview in webViewDidStartLoad:</li>
  <li>Make request</li>
  <li>Make stringByEvaluatingJavaScriptFromString in webViewDidFinishLoad:</li>
  <li>Show webview</li>
  </ol>
  
  <p>But when I run app, I can see how JS working. Where is my fault?</p>
  
  <p>Also, I write NSLog(@"%@", self.webView) before and after self.webView.hidden = FALSE;</p>
  
  <pre><code>&lt;UIWebView: 0x5e37720; frame = (0 44; 768 955); hidden = YES; autoresize = W+H; layer = &lt;CALayer: 0x5e37780&gt;&gt;
  &lt;UIWebView: 0x5e37720; frame = (0 44; 768 955); autoresize = W+H; layer = &lt;CALayer: 0x5e37780&gt;&gt;
  </code></pre>
  
  <p>FirstViewController.m :</p>
  
  <pre><code>- (void)webViewDidStartLoad:(UIWebView *)webView{
  self.webView.hidden = TRUE;
  }
  
  - (void)webViewDidFinishLoad: (UIWebView *) webView {
      [self useJScript:self.webView];
  NSLog(@"Show %@", self.webView);//result above^^^
  self.webView.hidden = FALSE;
  NSLog(@"Showned %@", self.webView);
  }
  
  - (void)useJScript:(UIWebView *) webView{
  NSLog(@"Применяю jscript для %@",webView);
  NSString *path = [[NSBundle mainBundle] pathForResource:@"jsmain" ofType:@"html"];
  NSFileHandle *readHandle = [NSFileHandle fileHandleForReadingAtPath:path];
  NSString *htmlString = [[NSString alloc] initWithData: 
                          [readHandle readDataToEndOfFile] encoding:NSUTF8StringEncoding];
  [webView stringByEvaluatingJavaScriptFromString:htmlString];
  }
  </code></pre>