How to check if an NSWindow is open
问题 I have an NSWindow which can be closed and reopened (I've called [setReleasedWhenClosed: NO] ). How do I check if it is open or closed programmatically? I've read the doc and Googled but can't see a sane way to do this. [isVisible] is deprecated. [occlusionState] isn't what I'm after. I've worked around it using notifications, but I can't believe there isn't some property or method on NSWindow to do this 回答1: You make make of use of screen property of NSWindow. If the window in offscreen it