gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-03 16:29:22 27 4
gpt4 key购买 nike

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

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com