Skip to content

Instantly share code, notes, and snippets.

@pier-oliviert
Created February 11, 2011 20:11
Show Gist options
  • Select an option

  • Save pier-oliviert/822927 to your computer and use it in GitHub Desktop.

Select an option

Save pier-oliviert/822927 to your computer and use it in GitHub Desktop.
[placeRequest setPredicate:[NSPredicate predicateWithFormat:@"longitude BETWEEN %@ && latitude BETWEEN %@",
[NSArray arrayWithObjects:
[NSExpression expressionForConstantValue:
[NSNumber numberWithDouble:(self.locationManager.location.coordinate.longitude - 0.35f)]],
[NSExpression expressionForConstantValue:
[NSNumber numberWithDouble:(self.locationManager.location.coordinate.longitude + 0.35f)]],
nil],
[NSArray arrayWithObjects:
[NSExpression expressionForConstantValue:
[NSNumber numberWithDouble:(self.locationManager.location.coordinate.latitude - 0.35f)]],
[NSExpression expressionForConstantValue:
[NSNumber numberWithDouble:(self.locationManager.location.coordinate.latitude + 0.35f)]],
nil]
]];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment