課程
/移動(dòng)開(kāi)發(fā)
/iOS
/Swift Weather APP
回調(diào)函數(shù)調(diào)用不了
2017-05-17
源自:Swift Weather APP 5-1
正在回答
我的也是出不來(lái),
?func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])
? ? {
? ? ? ? let location:CLLocation = locations[locations.count - 1] as CLLocation
? ? ? ? if (location.horizontalAccuracy > 0) {
? ? ? ? ? ? print(location.coordinate.latitude)
? ? ? ? ? ? print(location.coordinate.longitude)
? ? ? ? ? ? locationManager.stopUpdatingLocation()
? ? ? ? }
? ? }
現(xiàn)在代理方法換成這個(gè)了,但是沒(méi)執(zhí)行進(jìn)來(lái),而且權(quán)限詢問(wèn)也不跳出來(lái),關(guān)于privcy 我也設(shè)置了
檢查你設(shè)置了代理沒(méi)?
舉報(bào)
本課程將帶領(lǐng)大家使用Swift語(yǔ)言開(kāi)發(fā)一個(gè)完整的天氣 iOS APP
Copyright ? 2025 imooc.com All Rights Reserved | 京ICP備12003892號(hào)-11 京公網(wǎng)安備11010802030151號(hào)
購(gòu)課補(bǔ)貼聯(lián)系客服咨詢優(yōu)惠詳情
慕課網(wǎng)APP您的移動(dòng)學(xué)習(xí)伙伴
掃描二維碼關(guān)注慕課網(wǎng)微信公眾號(hào)
2017-06-28
我的也是出不來(lái),
?func locationManager(_ manager: CLLocationManager, didUpdateLocations locations: [CLLocation])
? ? {
? ? ? ? let location:CLLocation = locations[locations.count - 1] as CLLocation
? ? ? ? if (location.horizontalAccuracy > 0) {
? ? ? ? ? ? print(location.coordinate.latitude)
? ? ? ? ? ? print(location.coordinate.longitude)
? ? ? ? ? ? locationManager.stopUpdatingLocation()
? ? ? ? }
? ? }
現(xiàn)在代理方法換成這個(gè)了,但是沒(méi)執(zhí)行進(jìn)來(lái),而且權(quán)限詢問(wèn)也不跳出來(lái),關(guān)于privcy 我也設(shè)置了
2017-06-20
檢查你設(shè)置了代理沒(méi)?