2010-03-11 133 views
0

我有一個CLLocation,這是我的用戶位置, 現在在另一個類我必須打開地圖應用程序,並從userLocation到 另一點的路線。 但是我怎樣才能在另一個類的座標userLocation?從CLLocation獲取經緯度

+0

可能重複[緯度和經度來自mapView.userLocation](http://stackoverflow.com/questions/2325076/latitude-longtitude-from-mapview-userlocation) – Gilles 2012-03-25 20:29:05

回答

1

如果你想需要的CLLocation座標傳遞給另一個類,那麼美國可以採取NSUserDefaults的

幫助

即[[NSUserDefaults的standardDefaults]的setObject:forKey:@ 「」]的

+0

你也可以像其他類中的位置變量那樣使用共享對象,並傳遞CLLocation co -ordinates。 – 2011-08-30 09:00:48