Xcode opens xib File as regular text file

xcode

I have a Xcode project with .xib file. When I try to open them Xcode shows the plain text of these file, it does not show the Interface Builder Interface.

How can I make Xcode to show me what I want?

I have already cleaned the project and restarted my computer. Didn't help.

Screenshot of Xcode showing xib file as plain text

Please help me this.

Best Answer

The problem is that you have the version editor selected:

Xcode 6: version editor selected … Xcode 9: version editor selected

The version editor can only display source code. It can't display a xib graphically. You need to switch to the standard editor. Here are three ways to switch to the standard editor:

  • Press Command-Return.

  • Go to the menu bar and choose View > Standard Editor > Show Standard Editor.

  • Click the leftmost button in the “Editor” segmented control in the toolbar:

Xcode 6: standard editor selected … Xcode 9: enter image description here