title: Display selected row data from UITableView in UIButton
body: <p>I wrote this code to display the selected item from <code>UITableView</code> on <code>UIButton</code>. The problem is that <code>UIButton</code> title is not changing on selecting row but it changes after clicking on another item and put the label of button for the first selection.</p>
  
  <p>How can I directly display the data on a click ot a <code>UITableView</code> row.</p>
  
  <pre><code>func tableView(tableView: UITableView, didDeselectRowAtIndexPath indexPath: NSIndexPath) {
  
      countryButton.setTitle(names[indexPath.row], forState: UIControlState.Normal)
  }
  </code></pre>
  
  <p>Note : names is my array </p>