How to open a new window on button click in Cocoa Mac Application?
问题 I want to know how to open a new window on button click in Cocoa Mac Programming. Help me. I am doing a mac application which needs to open a new mac window on particular button click. 回答1: If you want to create a separate class for New Window, these are the steps: Create a class which is a sub class of NSWindowController e.g. NewWindowController Create a window xib for NewWindowController class. On button click code as: NewWindowController *windowController = [[NewWindowController alloc]