Reputation: 2358
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
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
Reputation: 14302
You could store them all in an NSArray
, and then iterate over the array cancelling each one.
Upvotes: 4