Reputation: 889
Currently I am running 3 task concurrently using AFNetworking.But my problem is that I need to refresh tableview once all the above three task complete.But as in AFNetworking all the operation are async. So any operation can finish first. I am not getting a point where I need to refresh my tableview. I am planning to do some critical section type implementation.Is there can other way to accomplish the above.
Upvotes: 1
Views: 238
Reputation: 19544
Use the built-in batched request operation feature of AFNetworking. The completion handler for the batch would include the logic to refresh your data source once all of the operations have finished.
Upvotes: 5
Reputation: 351
Maybe having some sort of 'active requests array' is a solution for you.
Upvotes: 2