Hey folks,
I have a ton of repeating code in my class that looks like the following:
NSURLConnection *connection = [[NSURLConnection alloc] initWithRequest:request
delegate:self];
The problem with asynchronous requests is when you have various requests going off, and you have a delegate assigned to treat them all as one entity, a lot of branching and ugly code begins to formulate going:
What kind of data are we getting back? If it contains this, do that, else do other. It would be useful I think to be able to tag these asynchronous requests, kind of like you're able to tag views with IDs.
I was curious what strategy is most efficient for managing a class that handles multiple asynchronous requests.