I have this code to get JSON:
Alamofire.request(.GET, worlds).responseJSON { (request, response, JSON, error) in
println(JSON)
//weakSelf.serverList = JSON
}
How to declare weakSelf here? I know it should be unowned in my case, but I can't find correct syntax for this. When I try use [unowned self].serverList instead of the commented line, the compiler shows me error "use of unresolved identifier 'unowned'". I also tried to declare constant before block like this:
unowned let uSelf = self
It works like a charm, but I want to understand how to use [unowned self] in my case.