On the VC before the request, declare a property (and @synthesize) to keep the result of the network request.
@property (nonatomic, strong) NSData *responseData;
Then on whatever event triggers the request, start it like this:
NSString *urlString = /* form the get request */
NSURL *url = [NSURL urlWithString:urlString];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
// consider doing some UI on this VC to indicate that you're working on a request
[NSURLConnection sendAsynchronousRequest:request queue:[NSOperationQueue mainQueue] completionHandler:^(NSURLResponse *response, NSData *data, NSError *error) {
if (!error) {
self.responseData = data;
// hide the "busy" UI
// now go to the next VC with the response
[self performSegueWithIdentifier:@"ThridVCSegue" sender:self];
}
}];
Then pass the response data to the third VC like this:
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
if ([[segue identifier] isEqualToString:@"ThridVCSegue"]) {
ThirdViewController *vc = (ThirdViewController *)[segue destinationViewController];
[vc dataFromHTTPRequest:self.responseData];
}
}
This assumes you'll use ARC, storyboards, and define that segue. ThirdViewController needs a public method to accept the http response data.