How can I get NSURLConnection to call it to delegate methods from another thread instead of the main thread. I'm trying to mess around with the schedule InRunLoop: forMode: but doesn't seem to do what I want.
I need to upload a large file and it interrupts the main stream so often that some kind of rendering that happens starts to become volatile.
NSURLRequest * request = [NSURLRequest requestWithURL:url]; NSURLConnection * connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO]; NSRunLoop * loop = [NSRunLoop currentRunLoop]; NSLog(@"loop mode: %@",[loop currentMode]); [connection scheduleInRunLoop:[NSRunLoop currentRunLoop] forMode:NSRunLoopCommonModes]; [connection start];
Another thing I donβt see is the Modes. There are only two modes documented, so there are not many for testing.
Any ideas?
thanks
ios nsurlconnection nsrunloop
gngrwzrd
source share