Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xcode Storyboard appears empty

Tags:

xcode

ios

swift

I updated Xcode 6.4 to Xcode 7. I open a project made with 6.4 and I find the main storyboard completely empty, like in the image:

http://imgur.com/0X41Q9H

In the left pane I can see all the objects for the View Controller, but I can't select anything from the right view. If I open the storyboard as source code, I can see everything.

I tried before and after converting the code to Swift 2, with no difference.

How can I fix this to view all objects in the view controller?

Thanks, Marco

like image 602
GavynSykes Avatar asked Sep 22 '15 18:09

GavynSykes


People also ask

Why is Main storyboard not showing up in Xcode?

You have SwiftUI enabled in your project, which does not use storyboards anymore. Your layout is inside the ContentView. swift file. If you do want to work the old way, with storyboards, you should uncheck 'Use SwiftUI' in the project creation screen.

How do I see storyboard in Xcode?

To get this, open the storyboard, click the 'assistant' editor, click the 'assistant editor menu button' (immediately to the right of the > arrow at the top left of the assistant window) and select Preview.

How to Add ViewController to storyboard?

To create a new view controller, select File->New->File and select a Cocoa Touch Class. Choose whether to create it with Swift or Objective-C and inherit from UIViewController . Don't create it with a xib (a separate Interface Builder file), as you will most likely add it to an existing storyboard.

What is Xcode storyboard?

Storyboarding is a feature built into Xcode that allows both the various screens that comprise an iOS application and the navigation path through those screens to be visually assembled.


Video Answer


1 Answers

The only thing that works for me is the as often the most obvious one (not for a lack of trying alternatives which include the words uninstall and re-install and purge):

Temporarily adjust the size of your View Controller (typically the height is the culprit) from (Inferred) to Freeform till every component of your document is theoretically visible.

Then all your components will be visible, editable, selectable... Proceed with your edits, save and switch it back to what it was before. All changes will get retained, the project will build & render fine.

It's an annoying additional step, but at least I could regain the ability to work on my project files.

like image 165
Bernhard Grabowski Avatar answered Sep 23 '22 03:09

Bernhard Grabowski