OK. I think I figured it out. Table view cells have some hard-coded padding you can't avoid. I don't think that is necessarily a bad thing. I've never noticed this. I think it would only be a problem if you had some large image that you wanted to bleed right to the edge. You might be able to fix it by manually hacking the frame of the cell. Table views, at least on the Mac, are just really tricky this way. I think an iOS table view could probably go right to the edge with no problem. Maybe look for some Apple demos. They tend to all do the same thing with a sidebar of images that go right to the edge.
In your example, I was able to hack it to get it to the edge. I turned off content insets for the clip view and manually set them to negative values. Even then I could only hack the left inset. The right one is for the scroll bar and that is automatically adjusted.
This would really only be an issue if you wanted a table view that consisted entirely of full-width images.
In my app, I do something similar to what you are doing with the background. The trick is, I'm using a custom row view, like this:
(NSTableRowView *) tableView: (NSTableView *) tableView
rowViewForRow: (NSInteger) row
This view does go to the edge.
Topic:
UI Frameworks
SubTopic:
AppKit
Tags: