Geocoding Multiple Locations - Knowing When “All” Completion Blocks Have Been Called
I am using the CoreLocation's geocoder to get the CLLocation coordinates for multiple map items. The geocoder calls a completion block on completion for each item. How do I create a similar block functionality which is called when all of these containing asynchronous geocoder calls have been completed? (I could use a manual counter. But there must be a more elegant solution) Here's my geocoding function so far. It loops through an array of location items and starts a new geocoding process for each. -(void)geoCodeAllItems { for (EventItem* thisEvent in [[EventItemStore sharedStore] allItems]) {