title: Class proper not assigned in swift
body: <p>I'm doing a practice, and find my class property(adNames) can't be assigned. But it can be assigned outside(the place where I comment out). Here is my code:</p>
  
  <pre><code>import UIKit
  import Alamofire
  import SwiftyJSON
  
  class AdTableViewController: UITableViewController {
  
      var adNames: [JSON]?
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          Alamofire.request(.GET, "http://codewithchris.com/code/afsample.json").responseJSON { (Response) -&gt; Void in
  
              if let value = Response.result.value{
  
                  let json = JSON(value)
                  print(json["secondkey"].arrayValue) //["item1","item2","item3"] 
                  self.adNames = json["secondkey"].arrayValue
              }
          }
  //        self.adNames = ["item1", "item2", "item3"]
      }
  
      override func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          if let names = adNames {
              return names.count
          }
          return 0
      }
  
      override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
          ...
      }
  
  }
  </code></pre>
  
  <p>Can anybody tell me the reason? Thanks!</p>