Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XIB File opens like an XML in XCode but opens correctly with Interface Builder

When I double-click my file StartWindow.xib in Xcode 4, it does not open into the integrated Interface Builder; it opens like a XML file. I can open all other xib files and they display as expected. I can open it with the old Interface Builder via "Open with".

What can I do to open it with the integrated Interface Builder?

like image 803
mabstrei Avatar asked May 27 '11 12:05

mabstrei


People also ask

How do I run XIB files in Xcode?

If you're trying to resolve any connection issues and have noticed that you need to edit a XIB file but have selected the Use Storyboards option when creating your project, simply right-click the Main. storyboard > click Open As > then click Source Code . This way you don't have to recreate the project from scratch.

What is an XIB file in Xcode?

What are XIB files? From the point of view of the UI designer, XIB files contain the views or windows that you design in Interface Builder – the controls, their layout and properties, and their connections to your code. It is important to understand that on a technical level, XIB files are stored object graphs.

Which data format do XIB files use?

Application interface created with Interface Builder, a graphical editor for designing and testing user interfaces; saved in a text-based flat-file format, introduced in Interface Builder 3.0. NOTE: XIB files are also called "development-time format" files.


2 Answers

Had this happen to me awhile ago. I had to go to File -> Close myfilename.xib and then reopen it before it would honor the file type. I think the shortcut is Ctrl + Cmd + W if you are looking at the file.

like image 56
jocull Avatar answered Sep 23 '22 16:09

jocull


Go to the File Inspector after selecting the nib file. Under Identity and Type, select the drop down list for File Type and choose the topmost element Default - com.apple....

like image 29
Deepak Danduprolu Avatar answered Sep 22 '22 16:09

Deepak Danduprolu