Created
August 21, 2013 21:56
-
-
Save jblocksom/6300752 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for (BNRNerd *nerd in self.nerds) { | |
[self.geocodeQueue addOperationWithBlock:^{ | |
NSOperationQueue *managingQueue = [NSOperationQueue currentQueue]; | |
[geocoder geocodeAddressString:nerd.locationStr completionHandler:^(NSArray *placemarks, NSError *error) { | |
CLPlacemark *placemark = placemarks[0]; | |
nerd.location = placemark.location; | |
[self fetchWeatherForNerd:nerd]; | |
[managingQueue setSuspended:NO]; | |
}]; | |
[managingQueue setSuspended:YES]; | |
}]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment