How can I programmatically close a window in cocoa mac ? I have opened a second window/xib from the first window/xib using button click. I need to close the first window/xib programmatically on opening or clicking the button. How can I do that?
Objective-c – How to close a window programmatically in Cocoa Mac
cocoamacosobjective cwindowxib
Best Answer
Apple has some useful sample code on Nib Loading. It doesn't directly address this question however; the following code does.