【发布时间】:2016-09-13 13:10:06
【问题描述】:
我刚刚安装了 Alamofire 3.0 和 swift 2.2 和 xcode 7.3.1
当我尝试按照以下示例提出请求时:
https://github.com/Alamofire/Alamofire
xcode 是这样说的:
我不明白为什么
【问题讨论】:
-
Alamofire 代码不在函数中,它是“浮动的”。你不能把这样的代码放在任何你想要的地方。
-
将代码放入 ViewDidLoad()