cocoa - 是否可以在 CALayer 上显示 NSWindow?

标签 cocoa core-animation calayer nswindow

我获得了 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/

相关文章:

ios - 圆角仅适用于 UITableView 的底部边缘

objective-c - 为什么 NSFastEnumeration 快?

objective-c - 如何检测耳机是否连接到Mac或断开连接

cocoa - 使用自动布局和 "jumpy"对焦环调整动画大小

iphone - 在特定点停止 CABasicAnimation

ios - 更新 CALayer 的旋转

objective-c - 在 IKImageBrowserCell 中为 CALayer 设置动画

swift - 如何将 CGImage 居中放置在 CALayer 上?

xcode - 以编程方式将 checkboxcell 添加到 NSTableView

iOS浏览器编程技术