Missing ViewController.xib in Xcode 5
Solution 1
XIB is an older format of Interface Builder. In newer versions of Xcode, by default, the project is created with a storyboard (Main.storyboard
in your project). The difference is that in storyboards, you can see all the views of your app at once (and transitions between them), and with XIBs you have to keep them separately.
I'm not sure about this (can't check it right now), but if you insist on using XIBs, there should be a checkbox somewhere during creating a project. Anyway, I recommend you getting familiar with the storyboards, they are supposed to be a successor to XIBs.
As I can see in the tutorial, the author says 'XIB' even if he has a storyboard in his project, probably because he got used to XIBs. All in all, they are very similar in usage.
Solution 2
Actually storyboards contain .xibs (in your project one .xib as you created single view app.) The xib is just the user interface file shown in your second screenshot.
You just have to click the "Show assintant editor" on top right (the button with the suit) to split the xcode window and see the xib alongside the viewcontroller header/or implementation files.
Nyxynyx
Hello :) I have no formal education in programming :( And I need your help! :D These days its web development: Node.js Meteor.js Python PHP Laravel Javascript / jQuery d3.js MySQL PostgreSQL MongoDB PostGIS
Updated on June 10, 2022Comments
-
Nyxynyx about 2 years
I'm new to iOS programming and is currently following the tutorial at http://codewithchris.com/demo-app-with-xcode-and-interface-builder/
We first create a new project using the
Single View Application
library.Question: About half way into the tutorial, it says
Once you have ViewController.xib opened on the left pane and ViewController.m opened on the right pane...
However there is no .xib file anywhere in the Project Navigator, and this is the first mention of an .xib file in the tutorial.Am I supposed to get a .xib file somewhere along the way? If so, which step will create the .xib?
-
ThomasW over 10 yearsUnfortunately, there is no checkbox to choose between storyboards or xibs when creating a new project. However, there is a checkbox when creating a new ViewController.