Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialdanielgonzalez19
Courses Plus Student 4,491 PointsMissing elements on Main.storyboard
I am new to the board so hello to everyone :)
I was following a tutorial "Build a Simple App with Objective-C" and my main.storyboard alongside all the elements in it disappeared. The application still runs but I am not able to interact with the storyboard anymore.
I do not recall doing anything that I have not done before. I think removed some of the restrictions from my labels before it happened but I am not sure.
I was reading online and it seems that some people had this problem when using "Auto layout" I tried enabling/disabling it but nothing happened.
This is what my app looks like right now. http://postimg.org/image/t1j8xtc8r/
Thanks a lot for the help.
1 Answer
jcorum
71,830 PointsThis happened to me once.
Look in the View Controller Scene if you see all the elements listed there, there's hope! They haven't been deleted.
The problem, in my case, was that the size class under the Storyboard didn't match the size class for an element in the Attributes inspector.
First look to see what size class you have for the Storyboard. The default is wAny hAny. (You should see this in the middle of the bar just below the Storyboard.)
Then click on any element (button, label, etc.) in the Storyboard. Click on its Attributes inspector. Scroll to the bottom and see what, if anything, is marked as installed.
If, e.g., your Storyboard is wCompact hAny, then wC hAny should be checked as Installed.
Once I'd straightened this out all my elements came back.
danielgonzalez19
Courses Plus Student 4,491 Pointsdanielgonzalez19
Courses Plus Student 4,491 PointsThanks for the reply jcorum,
I am not sure what happened and I was not able to see any of my elements. So no hope for me.
Thankfully, I did not loose a lot of work. Now that I know that might be a bug or (I messed up something-somewhere-without-knowing) I am just committing to GitHub more often :)