課程
/移動(dòng)開(kāi)發(fā)
/iOS
/Swift Weather APP
模擬器運(yùn)行,沒(méi)提示需要使用地理位置信息, 回調(diào)也沒(méi)進(jìn)去
2016-04-10
源自:Swift Weather APP 5-1
正在回答
建議結(jié)合老師最新的源碼學(xué)習(xí):請(qǐng)求地理位置信息代碼如下 :
?func requestLocation() {
? ? ? ? locationManager.requestWhenInUseAuthorization()
? ? ? ? locationManager.requestLocation()
? ? }
infolist中添加的如下:NSLocationWhenInUseUsageDescription :Location is required to retrieve the weather info for your current place.
舉報(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)
2016-04-17
建議結(jié)合老師最新的源碼學(xué)習(xí):請(qǐng)求地理位置信息代碼如下 :
?func requestLocation() {
? ? ? ? locationManager.requestWhenInUseAuthorization()
? ? ? ? locationManager.requestLocation()
? ? }
infolist中添加的如下:NSLocationWhenInUseUsageDescription :Location is required to retrieve the weather info for your current place.