How to open a new window on button click in Cocoa Mac Application?

If you want to create a separate class for New Window, these are the steps:

  1. Create a class which is a sub class of NSWindowController e.g. NewWindowController
  2. Create a window xib for NewWindowController class.
  3. On button click code as:

    NewWindowController *windowController = [[NewWindowController alloc] initWithWindowNibName:@"You Window XIB Name"];
    [windowController showWindow:self];
    

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)