name-it
name-it

Reputation: 2358

is it possible to cancel all NSURLConnection being processed?

i have N number of NSURLConnection running behind, the thing is that i want cancel all the NSURLConnection together. i know we can cancel the NSURLConnection one by one

any help?

Upvotes: 2

Views: 435

Answers (2)

Andy
Andy

Reputation: 14302

You could use an NSOperationQueue by add each connection as an NSOperation. When you want to stop all the connections, you can kill the queue with the cancelAllOperations method.

Upvotes: 2

Andy
Andy

Reputation: 14302

You could store them all in an NSArray, and then iterate over the array cancelling each one.

Upvotes: 4

Related Questions