Skip to content

Instantly share code, notes, and snippets.

@quellish
Created February 1, 2016 20:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save quellish/9469dadad1c2ee05fb4c to your computer and use it in GitHub Desktop.
Save quellish/9469dadad1c2ee05fb4c to your computer and use it in GitHub Desktop.
NSExpression distanceToLocation:fromLocation:
expression = [NSExpression expressionForFunction:@"distanceToLocation:fromLocation:"
arguments:@[
[NSExpression expressionForConstantValue:to ],
[NSExpression expressionForConstantValue:from ]
]
];
result = (NSNumber *)[expression expressionValueWithObject:nil context:nil];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment