How to close a window programmatically in Cocoa Mac?

前端 未结 4 1787
说谎
说谎 2021-02-04 13:20

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 pro

4条回答
  •  孤城傲影
    2021-02-04 13:31

    U may use "performClose" action. Choose nib file (your window which u wont closed), open Connections inspector, connect "performClose" action with u button.

提交回复
热议问题