Alamofire, SwiftyJSON update UI after receiving response
<p>Hi I'm writing code to talk to server api using Alamofire and then parse the JSON respond using swiftyJSON. After get all the result, I want to update to UI accordingly but seem cannot</p>

<p>here is my Alamofire request with swiftyJSON parsing (in Pokemon.class)</p>

<pre><code>func downloadPokemonDetails1(completed: DownloadComplete) {

    let url = NSURL(string: _pokemonUrl)!

        Alamofire.request(.GET, url).responseJSON { response in

//            print(response.description)
            guard response.result.isSuccess else {
                print(response.result.error.debugDescription)
                return
            }

            let json = JSON(response.result.value!)
//            print(json.description)

            self._name = json["name"].string
            self._height = json["height"].string
//            print(self._height)
            self._type = json["types",0,"name"].string
   //            print(self._type)
}
</code></pre>

<p>My DownloadComplete in constanst.swift</p>

<pre><code>typealias DownloadComplete = () -&gt; ()
</code></pre>

<p>Note: I can print all the value (valid) so response is ok</p>

<p>But the problem is that when I call the function in a ViewController. the UI is not updated</p>

<p>Here is how I call the function in viewController</p>

<pre><code>pokemon.downloadPokemonDetails1 {
            print(self.pokemon.type)
            self.updateUI()
        }
</code></pre>

<p>updateUI() func:</p>

<pre><code> func updateUI() {
        nameLbl.text = pokemon.name
        typeLbl.text = pokemon.type
        heightLbl.text = pokemon.height
  }
</code></pre>

<p>Is anyway to update UI after receive the data from server? anyhelp is much appreciate. Thanks</p>