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.
因此,这是默认共享表的外观: 如您所见,共享表将出现在窗口顶部,并使其后面的内容变暗。我怎样才能做出这样的NSWindow行为(使后面的东西变暗并使所有东西都无法选择)?我一直在寻找,但我找不到答案。 谢谢!
NSWindow
创建一个新的 NSView(派生您自己的类以实现 drawRect:) 并使其半透明。将它放在窗口中的所有其他视图之上。这将防止鼠标事件到达其他视图并实现暗淡的外观。然后使用“社交表”的模式窗口。