开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜