Convert the NSValues to a CGPoint

67 views Asked by At

I need to convert NSValues from a dictionary to CGPoint.

Example: I have a dictionary with 2 items in it:

NSValue *p1 = [dict objectForKey:@"LATITUDE"];
NSValue *p2 = [dict objectForKey:@"LONGITUDE"];

When I try this, it gives an error

CGPoint point = CGPointMake((CGFloat)p1;, (CGFloat)p2);
0

There are 0 answers