Xcode/Interface Builder is ignoring the Fill Color setting

852 Views Asked by At

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...

2

There are 2 best solutions below

0
trojanfoe On BEST ANSWER

From the NSBox documentation:

Special Considerations

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

0
Aviram Netanel On

set Box Type to Custom , as in the attachment:

enter image description here