Search code examples
xcodexcode4

How to I create a MainWindow.xib in Xcode 4.2 in an iOS application?


I am just starting out learning to build interfaces, but the book I am following is a little dated and it says that Xcode should create it for me with my new project, however it didn't. So now I need to link my buttons to my app delegate, but I can't because it isn't showing up when I right click on my buttons. And yes, I did define my methods and instance variables.


Solution

  • Xcode very much will create a MainWindow.xib if you choose Cocoa Application as the project type. Check to make sure you aren't either creating an iOS project or a command-line tool... both can be easy to accidentally select when you are just starting to learn.

    (FYI, I just verified in Xcode 4.2.1 that a MainWindow.xib was created for me.)