If I selected a row, I want to disable the highlighting blue color. In Swift language, I'm unable to set selectionHighlightStyle to NSTableViewSelectionHighlightStyleNone for my NSTableview.
This is my code:
func tableView(tableView: NSTableView, viewForTableColumn tableColumn: NSTableColumn?, row: Int) -> NSView? {
let cellView: NSTableCellView = tableView.makeViewWithIdentifier(tableColumn!.identifier, owner: self) as! NSTableCellView
tableView.selectionHighlightStyle = NSTableViewSelectionHighlightStyleNone // error statement "Use of unresolved identifier 'NSTableViewSelectionHighlightStyleNone'"
return cellView
}
For the statement tableView.selectionHighlightStyle = NSTableViewSelectionHighlightStyleNone
it is throwing an error 'Use of unresolved identifier 'NSTableViewSelectionHighlightStyleNone'.
Please change your code as following to make it compilable in Swift: