“Etched” appearance labels

One neat trick that Apple tend to use when placing text in a window’s bottom bar, toolbar or titlebar, is to render it with a sort of “etched” effect, making the text appear set into the window. For example, Safari’s status bar:

Screen Shot 2012-05-30 at 14.56.52

Getting the same appearance for your own app isn’t too tricky, but is surprisingly hidden away. The magic API (as covered by others) is:

The real annoyance here is that there’s no setting in Interface Builder. But fear not! As long as you’re targeting OS X 10.6 or later, set up a user defined runtime attribute for the cell:

Screen Shot 2012-05-30 at 15.12.52
© Mike Abdullah 2007-2015