swift - alamofire throws "expected declaration" error -
i downloaded latest versions of xcode , alamofire create simple app... unfortunately seems impossible send out request !
every time try build project, xcode sends me "expected declaration" error don't understand.
any ideas ? googled hours , couldn't find helpful posts...
if xcode sends "expected declaration" error message, located alamofire part in class declaration area.
solution: move alamofire part inside method. viewdidload method.
example:
class myview : uiviewcontroller { // not here // alamofire.request( ... override func viewdidload() { super.viewdidload() // here alamofire.request( ... } }
Comments
Post a Comment