title: UIWebView webViewDidStartLoad not called
body: <p>I post this message because i haven't found any answer.</p>
  
  <p>I send a request to my <code>UIWebView</code>, <code>webViewDidStartLoad</code> is not called. I need to use the method reload, and then it will work. By the way the <code>shouldStartLoadWithRequest</code> is called then twice.</p>
  
  <p>If i'm using a test url (like say Google), i will not get any problem. So that it not seems to be from my code.</p>
  
  <p>But here, I'm calling a ugly site who use lot of angular JS (and i don't know how it has been made). Strange things is that it's working fine on Safari.</p>
  
  <p>What i don't understand is that it just get "stuck" in <code>shouldStartLoadWithRequest</code>. But after no callback. Nothing happen, even (<code>didFailLoadWithError:</code>).
  Any idea?</p>
  
  <p><em><strong></em>**<em>*</em></strong> EDIT <strong><em>*</em>**<em>*</em>*</strong></p>
  
  <p>Ok i found the problem, but that's still a strange related issue. I've found the solution trying to send you the code, and i couldn't believe that the code was actually working.</p>
  
  <p>the fact is that i was calling http request while my web view was hidden, and i don't know why, the second call is never working. You cannot reproduce the "bug", since the website is sandboxed, and i've tested on Google, and that works. </p>
  
  <p>You need to know that the site i have tested on use a lot of angular JS based on GUI state. If someone still can explain me how can a uiwebview can be stuck from server side (webViewDidStartLoad never called), i'll be happy. So the bug is 100% server related.</p>
  
  <p>Here the code:</p>
  
  <pre><code>@interface ViewController ()&lt;UIWebViewDelegate&gt;
  @property(nonatomic, retain)UIWebView* webview;
  @end
  
  @implementation ViewController
  @synthesize webview = _webview;
  
  #pragma mark - UIWebViewDelegate
  
  - (BOOL)webView:(UIWebView *)webView
      shouldStartLoadWithRequest:(NSURLRequest *)request
      navigationType:(UIWebViewNavigationType)navigationType{    
      return YES;
  }
  
  - (void)webViewDidStartLoad:(UIWebView *)webView{
      // With that ugly site it will be never called if _webview.hidden is set to true.
  }
  
  #pragma mark - lifeCycle
  
  - (void)viewDidLoad{
      [self setUpWebView];
  
      // first time, it will work.
      [self performSelector: @selector(loadUrlString:) withObject: @"http://theUglySite.com" afterDelay: 1];
  
      // now, if the uiwebview is hidden, no response.
      [self performSelector: @selector(loadUrlString:) withObject: @"http://theUglySite.com" afterDelay: 3];
  
      [super viewDidLoad];
  }
  
  #pragma mark - logic
  
  - (void)setUpWebView{
      self.webview        = [[[UIWebView alloc] initWithFrame:(CGRect){0,0,320,480}] autorelease];
      _webview.delegate   = self;
  
      // hidding the webView will break the delegate callBack. That will still work on normal
      // urlRequest.
      _webview.hidden = YES;
  
      [self.view addSubview: _webview];
  }
  
  - (void)loadUrlString:(NSString*)urlString{
      NSURL* url = [NSURL URLWithString: urlString];
      NSURLRequest* request = [NSURLRequest requestWithURL: url];
      [_webview loadRequest: request];
  }
  
  @end
  </code></pre>