Storyboard View Elements Greyed Out
Asked Answered
D

3

59

I'm currently trying to edit a storyboard file, in Xcode 6 (not sure if this is an Xcode bug, or if i've just done something), and when I go to the view i want to edit this is what the scene shows me : Problem

Is this something I've enabled accidentally? or if it's an Xcode problem. It first did this after I enabled source control for the project.

Anyone have an idea on how to fix?

Duthie answered 6/9, 2014 at 12:44 Comment(3)
If you have size classes enabled, check the device size in IB (the thing with the grid) (do not have access to Xcode right now to reproduce, but if Im not mistaken it has to do with size classes)Auvil
@Auvil Thank you so much!, if you submit as an answer, I'll accept, but you were 100% right, thanks again.Duthie
Hi, Im glad that helped you I will submit an answer and amend with more specific info laterAuvil
A
68

The problem is probably related to Size Classes. If you have the option enabled make sure that the views were created for the size class that you have currently selected in IB (the grid thing).

Auvil answered 6/9, 2014 at 13:9 Comment(0)
A
56

If you want to make sure it works with any width and height, find the constraint:

wAny hR

and remove it by clicking on the x, leaving only installed checked:

wAny hAny


I think Xcode will stop adding these automatically if you set the view to Any Width | Any Height in the Storyboard:

storyboard bottom bar

Azalea answered 5/12, 2014 at 11:6 Comment(0)
R
1

Check that Installed is checked at the bottom of the Attributes Inspector

enter image description here

Redon answered 1/11, 2017 at 0:39 Comment(1)
This is what fixed mine! Looks like I added some elements in regular width, and they were not showing up when I switched back to any width. I had to manually adjust all my constraints (mentioned by @jomo) and all my views so they all were installed for all, with no special size classes configured.Hydrocortisone

© 2022 - 2024 — McMap. All rights reserved.