XIB File opens like an XML in XCode but opens corr

2019-03-14 07:15发布

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?

7条回答
贪生不怕死
2楼-- · 2019-03-14 07:27

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

查看更多
甜甜的少女心
3楼-- · 2019-03-14 07:31

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.

查看更多
一纸荒年 Trace。
4楼-- · 2019-03-14 07:31

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

查看更多
欢心
5楼-- · 2019-03-14 07:31

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

查看更多
ゆ 、 Hurt°
6楼-- · 2019-03-14 07:37

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

查看更多
爷、活的狠高调
7楼-- · 2019-03-14 07:40

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.

查看更多
登录 后发表回答