Niall Kehoe
Niall Kehoe

Reputation: 416

Objects in Xcode Storyboard disappearing

I was designing a storyboard in Xcode. Then I wrote a bit of code. When I came back, all my objects in a view had disappeared. Everything's working I just can't see them on my storyboard. But they appear when I run it. I really need to add a uiimageview to this view. But since there are no objects visible I can't. Any help appreciatedhere's t running in the simulater and my storyboard in Xcode

Upvotes: 4

Views: 1963

Answers (3)

Rohit Parsana
Rohit Parsana

Reputation: 166

Select a size class compact in width like "wCompact hAny"

See the width of size class in red box.

See the width of size class in red box.

See the width of size class in red box

Upvotes: 0

Lumialxk
Lumialxk

Reputation: 6379

Did you add constraints to your views?If yes,you changed the size of top level view,just select views and CMD+Option+=(this is resizing view as suggested). If no,add constraints first. If you drag view with blue lines,this will sometimes work,not always.

Upvotes: 0

technerd
technerd

Reputation: 14514

I think this would be the case with you.

Suppose you add label in controller when size class is any other than wAny hAny. Suppose you are adding label in wCompact hRegular size class.An adding constraint for it.

enter image description here

enter image description here

Now you move to other size class. Suppose you change it to wAny hAny. Now it looks will not find on storyboard and look like this.

enter image description here

enter image description here

In 4th image label looks like hidden and also not visible on storyboard. So it is better to design storyboard in wAny hAny to make it visible in all size classes. Assuming this will be the case with you.

Upvotes: 3

Related Questions