Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why don't my views show up in Storyboards and are greyed out in the left pane?

enter image description here

I am experiencing a weird bug in Storyboards.

I set up a UITableViewController with prototype cells and set some autolayout constraints. Everything fine until here.

Then, I had to move the whole project directory into another folder. This is a normal action I believe that shouldn't lead to any problems since the app and all the files are pretty much self-contained.

However, since I moved the project, the prototype cells in the UITableView are shown empty within my Storyboard, but the subviews are still showing up in the left pane where all the scenes and views are shown... Only that they are greyed out (see the screenshot)... Does anyone know what this means? I also looked into the XML of the Storyboard file, but everything seemed normal to me in there...

Any ideas?

EDIT: Strange thing also is that the IBOutlets from the custom classes still are set and link to the views in the storyboard... but only in the left pane, not in the storyboard itself.

like image 454
nburk Avatar asked Nov 24 '14 18:11

nburk


1 Answers

Just found an answer myself, it was because Size Classes were reset after I moved the project...

Greying out views is Xcode's standard behaviour when the views are only set for a specific size class which is currently not selected!

I had set the size classes for my UIViewController to Compact - Any, this is what it looks like in proper state:

enter image description here

The problem occurs when I change the size classes to another one (e.g. Any - Any):

enter image description here

like image 79
nburk Avatar answered Sep 28 '22 17:09

nburk