Skip to content

Instantly share code, notes, and snippets.

@julianfox
Created May 19, 2014 14:58
Show Gist options
  • Save julianfox/1563313e54f4502fcec0 to your computer and use it in GitHub Desktop.
Save julianfox/1563313e54f4502fcec0 to your computer and use it in GitHub Desktop.
PFQuery *query = [PFUser query];
[query whereKey:@"position" nearGeoPoint:position];
query.limit = 20;
[query findObjectsInBackgroundWithBlock:^(NSArray *objects, NSError *error) {
if (!error) {
for (PFObject *object in objects) {
NSLog(@"%@", object[@"username"]);
}
} else {
NSLog(@"Error: %@ %@", error, [error userInfo]);
}
}];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment