我获得了 CALayer*
,并且想知道是否可以动态创建 NSWindow
并将其显示在图层上?
提前致谢!
最佳答案
I'm provided with a CALayer* and would like to know if it's possible to dynamically create a NSWindow …
是的。
… and show it on the layer?
不。
您可以创建一个了解窗口或其内容 View 的图层,并且在 told to draw 时,将窗口的内容 View 告知 draw ,或者你可以take a screenshot of the window并将其设置为 the layer's contents 。但您不能将窗口放入图层中。
关于cocoa - 是否可以在 CALayer 上显示 NSWindow?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7927563/