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

后端 未结 2 1104
难免孤独
难免孤独 2020-12-10 18:26

\"enter

I am experiencing a weird bug in Storyboards.

I set up a UITable

相关标签:
2条回答
  • 2020-12-10 19:08

    This happened to me because I copy and pasted some of my views from nib into storybaord. Turning size classes off, and turning it back on fixed the issue. This can be done in File inspector, using a checkbox named Use Size Classes

    0 讨论(0)
  • 2020-12-10 19:19

    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

    0 讨论(0)
提交回复
热议问题