34

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?

Kyle Clegg
  • 38,547
  • 26
  • 130
  • 141
mabstrei
  • 1,200
  • 3
  • 13
  • 28

8 Answers8

33

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.

jocull
  • 20,008
  • 22
  • 105
  • 149
32

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....

Deepak Danduprolu
  • 44,595
  • 12
  • 101
  • 105
  • 45
    Had this happen to me today. I also 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. – jocull Nov 05 '11 at 18:47
  • 1
    @jocull you should submit your comment as an answer. this is the actual solution, since I'm guessing most that came here never changed the file type away from default in the first place. – Kyle Clegg Aug 09 '12 at 00:12
  • 1
    @jocull +1 - got this directly after creating a UIViewController subclass with xib :o – Henrik Erlandsson Aug 31 '12 at 14:49
  • in XCode 4.6, I'm not seeing any com.apple...I did however have Default - Interface Builder Cocoa Touch XIB selected and it was still raw. I selected the already selected default then ctrl+cmd+w and it worked. I did try ctrl+cmd+w before selecting the preselected again and it didn't work, leading me to believe it's the actual act of clicking on the already selected choice that made it work along with ctrl+cmd+w...strange but true stories of an iOS developer... – whyoz Feb 06 '13 at 00:16
17

I had this problem when I had the "Blame" view toggled on!

Sam Clewlow
  • 4,293
  • 26
  • 36
17

This worked for me. i mistakenly got to the blame view when i had this issue,

but clicking on the "show standard editor" worked instantly

enter image description here

Edwin O.
  • 4,998
  • 41
  • 44
8

In File Inspector right click on your xib and select Open As -> Interface Builder

Leszek Zarna
  • 3,253
  • 26
  • 26
4

I had the same problem recently, make sure you have selected the appropriate Editor view in the upper right hand corner, which would either be the Standard Editor or Assistant Editor. The Version Editor option will make the .xib file appear in its .xml form.

3

With Xcode 13 or 14 make sure that "code review mode" in the view menu is turned off.

sakra
  • 62,199
  • 16
  • 168
  • 151
1

For me in Localization section nothing has added.

I had added a new localization English.

Now XIB is shown properly.

Stephan
  • 41,764
  • 65
  • 238
  • 329
LokiDil
  • 197
  • 1
  • 3
  • 13