[英]Retrieving Array with dictionary for a particular key in iPhone
我在檢索具有6個鍵的字典的數組時遇到問題。 當我把日志放到數組..它打印
"<+25.51695000, +84.53490000> +/- 0.00m (speed -1.00 mps / course -1.00) @ 9/19/11 12:10:43 PM India Standard Time",
我只想檢索+25.51695000, +84.53490000
坐標。 我該怎么辦。
通過NSLog(?)輸出進行猜測,您在NSArray中擁有的不是NSDictionary元素,而是一堆CLLocation元素。
您可以在這里查看文檔:
本質上,您可以這樣做:
CLLocation *location = (CLLocation *)[myArray objectAtIndex:0];
a = location.coordinate.latitude;
b = location.coordinate.longitude;
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.