Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

ArtOfWarfare

macrumors G3
Original poster
Nov 26, 2007
9,710
6,304
In Mavericks, Apple changed the appearance of NSTableViewHeaders (I think) within Finder to have a transparent, frosted effect, and float over the rows that scroll under them.

But if you make a new app and use an NSOutlineView, the NSTableViewHeaders are opaque and have their same bubbly look from prior versions of OS X. I've looked through the docs and there's nothing about this.

But there's one thing that catches my eye... several classes inherit from a new (as of OS X 10.9) protocol called NSAppearanceCustomization. This protocol only has about 3 sentences total written on it, so I can't see how to use it at all. Nevermind, as I was looking at the documentation and counting the sentences, I realized there was a mention of another new class, NSAppearance, which has a good deal more written about it.

... Nope, didn't help. I set the appearance of my entire window to Light Gray in interface builder, which didn't change anything as far as I can tell. I also hooked up the NSTableHeaderView to my AppDelegate and added the following code:

Code:
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
    self.headerView.appearance = [NSAppearance appearanceNamed:NSAppearanceNameLightContent];
}

- (void)awakeFromNib {
    self.headerView.appearance = [NSAppearance appearanceNamed:NSAppearanceNameLightContent];
}

But still no dice.

Is it possible that it's a private API? I'm finding it frustrating how lousy Apple is at sharing some of these UI components. IE, the tab bar. Apple uses the same tab bar in Xcode, Safari, and Finder, but they haven't shared it with us as far as I can tell. A kind of funny thing I've noticed - it looks like the team that makes Terminal wasn't given the tab bar, either. If you observe them side by side with all the other tab bars in the OS you'll notice subtle differences in how it behaves.

Or maybe I'm wrong. Does anyone know how we can have a tab bar that looks like the one in Safari/Finder/Xcode? Does anyone know how we can get frosted NSTableHeaderViews like Finder?

Am I forced to just roll my own if I want things like this?
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.