Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有个问题。我的 .xib 上有一个按钮和一个背景图像。我通过属性检查器为我的按钮设置了一个图像,但是当我运行程序并按下按钮时,会发生这种情况:
如果我不按它,它看起来很好。怎么了?
这由setHighlightsBy:单元格上的属性控制。它可能NSChangeBackgroundCellMask默认设置为。尝试设置NSContentsCellMask(如果您有备用的“按下”图像)或NSNoCellMask.
setHighlightsBy:
NSChangeBackgroundCellMask
NSContentsCellMask
NSNoCellMask