If you are using the NSURLConnection sync version
+ (NSData *)sendSynchronousRequest:(NSURLRequest *)request returningResponse:(NSURLResponse **)response error:(NSError **)error
you need to start two threads to get the desired behavior, you can do this by moving the load according to your own method and calling this:
- (void)performSelectorInBackground:(SEL)aSelector withObject:(id)arg
Another way would be to use the asynchronous version of NSURLConnection, see the document .
source
share