title: macOS - How do I use checkbox in NSTableView?
body: <p>I'm trying to put checkbox to the first column of a view based tableView. I dragged a check box button to the column, then the structure is like</p>
  
  <pre><code>Table View
      First Column
          Check
              Check
          Text Cell
  </code></pre>
  
  <p>Then in the <code>tableView</code> method of the view controller I'm doing</p>
  
  <pre><code>if identifier == "Check" {
      let cell = tableView.makeView(withIdentifier: NSUserInterfaceItemIdentifier(rawValue: "Check"), owner: self) as! NSTableCellView
      return cell
  } 
  </code></pre>
  
  <p>I get a run time error <code>Could not cast value of type 'NSButton' to 'NSTableCellView'</code>, what is the correct way to do it?</p>