Retrieving Array with dictionary for a particular key in iPhone
I am facing problem in retrieving array which has dictionary for 6 keys. when i put log to array..it prints
"<+25.516开发者_Python百科95000, +84.53490000> +/- 0.00m (speed -1.00 mps / course -1.00) @ 9/19/11 12:10:43 PM India Standard Time",
I want to retrieve only +25.51695000, +84.53490000
coordinates. How can I do so.
Guessing by the NSLog (?) output, what you have in your NSArray are not NSDictionary elements, but a bunch of CLLocation elements.
You can have a look at the documentation here:
CLLocation
Essentially, you would do this:
CLLocation *location = (CLLocation *)[myArray objectAtIndex:0];
a = location.coordinate.latitude;
b = location.coordinate.longitude;
精彩评论