title: How can I use NSURLConnection to make connection in background
body: <p>In one of my previous post someone suggest me to use the </p>
  
  <pre><code>NSURLConnection *conn = [NSURLConnection connectionWithRequest:theRequest delegate:self];
  </code></pre>
  
  <p>To make connection in a new thread to keep GUI working without freezing during the connection.
  But It now I can realize that this doesn't work.</p>
  
  <p>This is the whole method.</p>
  
  <pre><code>- (void)postRequestWithURLState:(NSString *)url
  {
      NSString *bodyRequest = nil;
      NSURL *requestURL = [NSURL URLWithString:url];
      NSMutableURLRequest *theRequest = [[NSMutableURLRequest alloc] init];
  
      //NSLog(@"-------------- bodyRequest: %@", bodyRequest);
  
  
  
      [theRequest setURL:requestURL];
      [theRequest setTimeoutInterval:2.0];
      [theRequest setHTTPMethod:@"POST"];
      [theRequest setHTTPBody:[bodyRequest dataUsingEncoding:NSASCIIStringEncoding]];
      [self.oauthAuthentication authorizeRequest:theRequest];
      NSURLConnection *conn = [NSURLConnection connectionWithRequest:theRequest delegate:self];
  
      self.web = conn;
  
  
  }
  </code></pre>
  
  <p>That is part of a class called greader. So I use this method in this mode.</p>
  
  <pre><code>   reader = [[greader alloc] init];
     [reader setDelegate:self];
  </code></pre>
  
  <p>Than I call it [reader postRequestWithURLState:url].
  But in this way it still freeze my app for some seconds. How can I execute this action without freezing my app for some seconds?</p>