Danny
Danny

Reputation: 780

Xcode 6 - Main.storyboard only showing up as source code, Interface Builder missing

Somehow my Xcode settings got messed up as it would only show my Main.storyboard file as XML code. I've been told this can be fixed by selecting the Interface Builder from the "Open As" menu, but there is nothing under the menu (the only "selection" is a greyed-out "<None>"). I've cleared my Xcode caches, but this does not help. Other than that, my project still compiles properly.

How can this be resolved?

Upvotes: 28

Views: 19077

Answers (12)

islam XDeveloper
islam XDeveloper

Reputation: 500

You Can Try other way : Select Storyboard -> Xcode menu -> View -> Hide Review Code

Upvotes: 0

sayedHaris126
sayedHaris126

Reputation: 11

I was stuck at (Hide Code Review helped here . You might be in code review mode and Xcode thinks you want to compare the XMLs) left and right arrow icons is code review Mode

Upvotes: 1

JBA
JBA

Reputation: 2899

I had this issue with Xcode 8, no luck with Open As > menu... and the solution was as follow:

Make sure the Type is Default - Interface Builder in the Identity and Type right panel (see screenshot). In my case it was "Swift source code" selected :

enter image description here

Now, in the left pane, right-click on your storyboard, and magically then the option Open As > Interface Builder - Storyboard appeared !

enter image description here

Upvotes: 4

Stephen Paul
Stephen Paul

Reputation: 2842

As so many people have pointed out, right-click on the file and hover over Open As and select Default - Interface Builder.

However, if this is not an option for you because Open As shows <None>, make sure you are in the standard editor and not the version editor. Go up to View in Xcode menu --> view --> hover over Standard Editor and select Show Standard Editor. Now repeat the steps others have suggested and you should get the results you're looking for.

Upvotes: 64

brainray
brainray

Reputation: 12884

Hide Code Review helped here (Xcode 12.2). You might be in code review mode and Xcode thinks you want to compare the XMLs

enter image description here

Upvotes: 38

Mike Zriel
Mike Zriel

Reputation: 1865

Tap on the Arrows icon that are left and right, see image below: enter image description here

Upvotes: 9

Zebra
Zebra

Reputation: 113

I had "Main.storyboard.xml" in Xcode 9 folder but can not see "Default - Interface Builder" in the list of extensions proposed in "Identity and type".

I simply deleted the .xml extension in the name of "Identity and type" and then I can see again "Default - Interface Builder" in Open as.

Upvotes: 1

SHEREENA T K
SHEREENA T K

Reputation: 211

change to Standard Editor by clicking 'Command + Enter' key . Then Main.storyboard may show as Interface Builder.

Upvotes: 20

Bill
Bill

Reputation: 1

Took some doing but I found how to fix this every time... When you click on the storyboard and it is showing as source, click on the icon that shows the utilities view on the righthand side.. Look for the identity type.. Type should be Default - Interface Builder.. Mine got switch to C Source Code.. Not sure how.. but...

Upvotes: 0

Ben Guthrie
Ben Guthrie

Reputation: 979

I had the same issue, where "Open As" wasn't an option on the main storyboard, and xibs were also showing as XML.

The solution that worked for me was to right click on an xib which did have the "Open as --> Interface Builder" option. Then, I went back to storyboard, and the main storyboard showed up properly.

Upvotes: 15

Douglas
Douglas

Reputation: 2524

If you go over to the project outline and control click on the storyboard file and hold down the cursor, you will see the option to open as, this will let you open the storyboard as a certain type. Click on that and choose open as story board. Good luck!

EDIT#1

Sorry, I think I misread your post. I thought you were doing those steps from the menu bar. Not the outline. I am assuming you have restarted Xcode and your computer.

Upvotes: 2

joakim
joakim

Reputation: 4041

This is just a quick fix/ long shot, and depending on the specifics of your situation it might not be helpful at all, but you can import and open storyboard files in other projects.

So, try importing your storyboard file in a new project and see if it displayed correctly there.

Has helped me in the past with misbehaving nib files.

Upvotes: 0

Related Questions