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 上获得一个自定义的 NSShadow,因为我还在窗口上应用了一些动画,所以我已经将窗口的内容视图设置为支持图层。
在 上应用 NSShadow 时contentView,阴影在视图的边框处被剪裁:
contentView
一种可能性是减少contentViewrect ( NSInsetRect ),但是 NSWindow 的大小调整边框与窗口的外观不匹配!
是否有机会将图层的阴影绘制到其边界之外?
编辑:显示的屏幕截图已经有一个-10 的插入矩形!