为了账号安全,请及时绑定邮箱和手机立即绑定

if let tempResult = jsonResult["main"]?["temp"]? as? Double 总是出错:Type "string" does not conform to protocol "NSCopying"

正在回答

2 回答

请看看github上的代码 https://github.com/JakeLin/SwiftWeather/blob/master/Swift%20Weather/ViewController.swift#L79 ,由于Apple更新了Swift的编译器,所以,视频的代码在Beta1上可以编译,在新版本就编译不了,请看github上最新的代码。

0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消
Swift Weather APP
  • 参与学习       35565    人
  • 解答问题       241    个

本课程将带领大家使用Swift语言开发一个完整的天气 iOS APP

进入课程
意见反馈 帮助中心 APP下载
官方微信