Search code examples
iphonexcodexibviewcontrollermainwindow

"Deleted" viewcontroller from MainWindow.xib. Is this possible?


So I accidentally removed the viewcontroller from the mainwindow.xib in xcode. I tried dragging the xib back into the mainwindow, but nothing is working. Is there anyway to get the viewcontroller back onto the mainwindow? When I run the app all that is showing is the window, not the viewcontroller so I know I did something wrong.


Solution

  • Yes, you can do all kinds of things accidentally using Xcode, make sure to use the integrated git repository or make a manual backup of files from time to time.

    As stated by bryanmac, you can create a new project and learn how interface builder binding works.

    Here's a good tutorial for starters:

    http://mobile.tutsplus.com/tutorials/iphone/iphone-sdk-interface-builder-basic-training/