Xcode doesn't make View Controllers by default anymore

Discussion in 'Mac Programming' started by gwelmarten, Feb 20, 2013.

  1. macrumors 6502


    I've had a couple of Mac Apps on the go for the last couple of years. Now I want to make a new one.

    Problem is, when I make a new Cocoa app in Xcode for OS X, it only gives me the appDelegate.h/m and MainWindow.xib (which has as a sub file 'Window - [AppName]', with a view inside it.

    When I've made my apps before, I've had View Controllers referring to each view on OSX. Why has this changed? How do I set Xcode up again to do this?


  2. macrumors 6502a


    File > New File > Objective-C Class > Subclass of NSWindowController (Check "XIB for user interface").
  3. macrumors 6502

    Yes, but then this XIB isn't automatically used when the application is built and run, like used to happen when it made them automatically.
  4. macrumors 6502a


    Make sure the window appears at start up (you can do so in the inspector panel to the right).

Share This Page