title: Handling timeout with Alert View - iOS
body: <p>Is it possible to handle a request timeout with a UIAlert? I would like to inform the user that there has been a time out. I set <code>0.0</code> just for testing to see if it would occur. The log does not print out so i do not believe i am handling correcting</p>
  
  <pre><code>request.timeoutInterval=0.0;
  </code></pre>
  
  <p>and to handle it:</p>
  
  <pre><code>- (void)connection:(NSURLConnection *)connection didFailWithError:(NSError *)error {
  if(error.code == NSURLErrorTimedOut){
      NSLog(@"Time out");
     }
  }
  </code></pre>
  
  <p>I am using <code>NSURLConnectionDelegate</code> and <code>NSURLConnectionDownloadDelegate</code></p>
  
  <p>Thanks.</p>