2 Replies
      Latest reply on Feb 10, 2019 5:57 AM by Lemontine
      Lemontine Level 1 Level 1 (0 points)

        I'm trying to get a similar look to the sidebar table view in redesigned Mac App Store app on 10.14. That nice sidebar seems to have the standard source list appearance (with vibrancy), but unlike regular table views, a selected row has a neutral colored vibrant selection, rather than coloring the row's background with the system control accent color.


        Can anyone give a suggestion on how to get this behaviour?


        Thanks very much.

        • Re: App Store Style NSTableView (source list with a neutral highlight color)
          Claude31 Level 8 Level 8 (5,465 points)

          A way to get the same result:


          - in IB, set the color of the background of the view of your tableView to a custom gray 92% (very clear)

          - set the background color of the tableView cell view to the same value


          Add this in your controller to force text to remain black when highlighted

              override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
                  if let cellAtRow = tableView.cellForRow(at: indexPath) {
                      cellAtRow.textLabel?.highlightedTextColor = .black


          That should do it.