Big Sur added a new property style, that defaults to automatic. Even though I’m setting it to full width, I can still see a difference between my app running on Xcode 12.1 vs 12.2
This is a sample app with a simple cell drawing its background red.
When debugging the interface I can see that the edges contain the table row. Which means that the cell is not occupying the entire full width of the row.
Please let me know if there is a way to get a single cell view to expand the entire tableview width.
Here is the sample application: https://www.dropbox.com/s/zx4qqncllja1sox/test.zip?dl=0
2
Answers
.fullWidth
actually includes horizontal padding at the row level.You will need to set
tableView.style = .plain
to get back the pre-Big Sur look and feel.From the
NSTableView
header files:☝️ An interesting observation. You can set plain style in Interface Builder but many people report that it doesn’t work. Seems like it won’t be applied if you compile not on Big Sur. In that case, like other answers suggest, specifying style in code does the trick: