title: Pass Data from TableViewController to XIB file Without Segues- Swift 3
body: <p>Im new to swift and learning swift 3</p>
  
  <p>Im trying to pass data from table view controller to XIB file . I have list of fruits in my table view controller. On click of that i would like to display fruit name in a label in new XIB controller. I tried below code but it is not showing me any data in XIB vc..please tell me what am I missing here</p>
  
  <p>My TableVC:</p>
  
  <pre><code>class FruitsTableViewController: UITableViewController {
  
      var fruits = ["Apple", "Apricot", "Banana", "Blueberry", "Cantaloupe", "Cherry",
                    "Clementine", "Coconut", "Cranberry", "Fig", "Grape", "Grapefruit",
                    "Kiwi fruit", "Lemon", "Lime", "Lychee", "Mandarine", "Mango",
                    "Melon", "Nectarine", "Olive", "Orange", "Papaya", "Peach",
                    "Pear", "Pineapple", "Raspberry", "Strawberry"]
  
      override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -&gt; Int {
          return fruits.count
      }
  
      override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -&gt; UITableViewCell {
          let cell = tableView.dequeueReusableCell(withIdentifier: "cell", for: indexPath)
  
          cell.textLabel?.text = fruits[indexPath.row]
  
          return cell
      }
  
      override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
          let dataToPass = fruits[indexPath.row]
          let detailsVC = ShowDetailsXibViewController(nibName: "ShowDetailsXibViewController", bundle: nil)
          detailsVC.dataFromVC = dataToPass
          self.present(ShowDetailsXibViewController(), animated: true, completion: nil)
  
      }
  
  }
  </code></pre>
  
  <p>Second VC:</p>
  
  <pre><code>class ShowDetailsXibViewController: UIViewController {
  
      @IBOutlet weak var lblFruit: UILabel!
  
      var dataFromVC : String?
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          lblFruit.text = dataFromVC
      }
  
      override func didReceiveMemoryWarning() {
          super.didReceiveMemoryWarning()
      }
  
  }
  </code></pre>