title: How to get NSObject value into String in swift?
body: <p>My separate NSObject class file call LocationDetails.swift</p>
  
  <pre><code>class LocationDetails: NSObject {
  
      var name:String!
      var place_Id:String!  
  
  }
  </code></pre>
  
  <p>UIView Controller where i assigning values to object, i have all the values stored in NSDictionary call arrayLocations and i want to get specific details from it to my object using didSelectRowAtIndexPath method.</p>
  
  <pre><code>import UIKit
  
  import CoreLocation
  
  
  
  var objLoc:LocationDetails = LocationDetails.new() 
  
  class CategoryMainView:  UIViewController,UITableViewDelegate,UITableViewDataSource{
  
   override func viewDidLoad() {
  
  }
  
  
  
  func tableView(tableView: UITableView, didSelectRowAtIndexPath indexPath: NSIndexPath) {
  
      getLocationsObject(self.arrayLocations[indexPath.row] as! NSDictionary)
      println("location object: \(objLoc)")
      println("\(objLoc.name)")
      println("\(objLoc.place_Id)") //Here im getting correct output all the time
  
  }
  
  func getLocationsObject(sender: NSDictionary){
      objLoc.name = sender.valueForKey("name") as! String
      objLoc.place_Id = sender.valueForKey("place_id") as! String
  }
  
  }
  </code></pre>
  
  <p>In my next ViewController where i want to show all those details in object </p>
  
  <pre><code>import UIKit
  
  class RatingView: UIViewController {
  
  @IBOutlet var ShopName :UILabel!
  
  
  
  override func viewDidLoad() {
  
  self.ShopName.text = objLoc.name
  
  }
  
  
  
  }
  </code></pre>
  
  <p>But this always give me nil values. Why it gives me nil values any solutions?</p>