How to Get an NSTableView with No Borders and No Insets on Big Sur?

MacOS Big Sur has arrived and it has a new style for table views. This new style makes rows taller and also adds some space to each row, insetting them. While you may like your app to adopt this look for most of your tables, it is possible that some tables look odd when insetted. There is a new style attribute you can apply both in IB and in code, which by default is set to automatic.
Read more →

SwiftUI Suitability for MacOS App Development

Update: this article is now old. SwiftUI should be considered for new Mac apps, at least for most of the UI. Read more about SwiftUI usage on Alex Grebenyuk’s blog.  I have been experimenting with SwiftUI lately as I started working on a new Mac application. This new application I’m working on, which shall go unnamed and uncategorised for the moment, is going to be complex, with a complex UI including many views with sidebars, tables, image views and 3d views.
Read more →

NSTokenField with Core Data Bindings: finally solved it

NSTokenField is particularly tricky to use with Core Data bindings. I wanted to model a to-many relationship between an object (specifically Client, Project, etc.) and multiple Tags. The user would select e.g. a client from a table view, and in the inspector panel a token field would represent the assigned tags, which the user can edit. It’s a typical master-detail configuration. Tags that already exist are autocompleted; non-existent tags are created once the focus leaves the field.
Read more →