Re: [問題] 取得使用者目前位置
現在這的 Method 已經不能用了
- (void)locationManager:(CLLocationManager *)manager
didUpdateToLocation:(CLLocation *)newLocation
fromLocation:(CLLocation *)oldLocation
要改用這個 Method
- (void)locationManager:(CLLocationManager *)manager
didUpdateLocations:(NSArray *)locations
上一個座標與現在的座標都在 locations 的陣列內
將這個陣列 Log 出來就能看到了
補充一下:舊的 Mathods 是從 iOS 6.0 開始取消的,
如果你需要給 iOS 6.0 之前的版本使用的話,
還是需要使用舊的 Mathod
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 220.133.234.121
※ 編輯: darktt 來自: 220.133.234.121 (02/13 22:24)
推
02/13 22:32, , 1F
02/13 22:32, 1F
→
02/13 22:33, , 2F
02/13 22:33, 2F
→
02/13 22:34, , 3F
02/13 22:34, 3F
推
02/18 03:11, , 4F
02/18 03:11, 4F
→
02/18 07:27, , 5F
02/18 07:27, 5F
→
02/18 08:45, , 6F
02/18 08:45, 6F
→
02/18 08:46, , 7F
02/18 08:46, 7F
討論串 (同標題文章)
完整討論串 (本文為第 2 之 2 篇):
2
5
MacDev 近期熱門文章
PTT數位生活區 即時熱門文章