Search code examples
xcodeinterface-buildernsbox

Xcode/Interface Builder is ignoring the Fill Color setting


I added an NSBox to my view, I set the fill color to the color I want:

enter image description here

But the color doesn't show up in Interface Builder and doesn't show up when I run the app. What am I missing?

I've also tried setting it programmatically via

[self.myBox setFillColor:[NSColor greenColor]];

but the fill color still won't change...


Solution

  • From the NSBox documentation:

    Special Considerations

    Functional only when the receiver’s box type (boxType) is NSBoxCustom and its border type (borderType) is NSLineBorder.