Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Missing ViewController.xib in Xcode 5

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.

enter image description here

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?

enter image description here

like image 268
Nyxynyx Avatar asked Oct 26 '13 21:10

Nyxynyx


People also ask

Where is XIB file in Xcode?

Select New Project -> Application -> SingleView Application and you will see here . xib file. :) Save this answer.


1 Answers

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.

like image 57
PiotrK Avatar answered Oct 09 '22 08:10

PiotrK