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.
有没有办法在 Cocoa 应用程序中说某个窗口是否“覆盖”了另一个窗口?是否可以[NSApp windows]按它们的相对(彼此)位置进行排序?
[NSApp windows]
这就是这样-[NSApplication orderedWindows]做的。如果一个窗口在该数组的后面,并且它的框架与您的窗口重叠,那么它至少被部分覆盖(除非自定义窗口形状的怪异)。
-[NSApplication orderedWindows]