Storyboard corruption on file open - ios

I am having a problem where my content is repeatedly being shifted to the right in the storyboard for multiple view controllers when I open the project. I have done nothing at this point, simply opened it. Further, undoing the modifications through git does nothing. I fix the problems and go about my day adding new features... the apps run fine in the phone and appear normal in the storyboard. However, when I open the project the next day, same thing happens and I have to fix everything again. Has anyone else experienced this issue, and what was your resolution to the problem?

I figured out what the problem was. On my first View Controller, I had some labels that had somehow become set to a width of zero. After I fixed them, and embedded them in a stack, the problem resolved itself. I have no idea how this screwed up several other view controllers; however, fingers crossed, the corruption hasn't happened again since I fixed it.

Well apparently there is just some display bug in Xcode. When I click on a new size class and click back, the elements are restored to their correct size. This was maddening, but apparently it's working fine now if I do this quick fix.

Related

iOS Storyboard ViewController went Blank

I'm working on the code in a project when I suddenly notice the ViewController in Storyboards is greyed out with the name of the VC in the center.
Here's a screenshot..
I was only editing some code on the right and I'm not sure exactly when, but my eyes adjusted and noticed this VC completely greyed out in Storyboards.
I tried deleting Derived Data, cleaning, quitting Xcode, building again, etc.
Nothing seems to work... ANy help with this would be super appreciated. I'm also very new to programming in general.
Well it turns out if you ever run into this problem, it's because you're not paying close attention and haven't realized you've somehow magically deleted your entire view inside the ViewController.
I did this once before by hitting something randomly on my keyboard (don't know what it was) but that time I saw it happen and just hit "undo".
This time I was passed the point of simply hitting "undo" and had to add a view again and rebuild and reconnect all the components in the view. That was basically it. Problem solved...

XCode 8 : Weird Storyboard issue that rolls back changes each time after it is saved

I am facing a really weird storyboard issue. I am using Version 8.0 (8A218a) . For one of my projects, I have two storyboard files, one for iPhone and one for iPad.
Both storyboards are behaving insanely: I open a storyboard file and make changes to a ViewController's view, then I save. I run the application and every thing is OK.
I switch to another file then open the stoyboard file again, and it loads back the old view! (changes subviews locations, to the left after I center them, the same subviews every time).
To track down the issue :
1- I made a copy of the project, cleaned, deleted derived data. Did not solve.
2- I thought about Source Control, so I disabled Git. Did not solve.
3- Unless it is a common bug, I am out of options.
The problem is that it does this in each of my 2 storyboard files. And when I open one and fix it them switch back to the second, I find it changed!
Did anyone face this weird issue with storyboard?
Any explanation and/or suggestion to solve it please?

iOS UI elements are invisible

I work on a project for few days. All worked great until today. I've added few elements to view just like normal today. But when I launch app on device I can't see them. They are there: size classes works ok, everything is on right place. I can even touch UISegmentedControl and pick item on UIPickerView that makes the Picker View noise. But they are invisible - I can see only older elements.
I can't even tell where is the problem, because new elemts have THE SAME setting as olders. Methods like [_someElement setHidden:NO] does nothing.
Can you help me please?
Edit: they are visible in IB Preview
probably bug with cache, try to:
-delete all data from DerivedData folder
/Users/%user name%/Library/Developer/Xcode/DerivedData
-manually remove application from device/simulator
rebuild application
Thank you, I solved it after few hours, when I was focusing on another problem.
AVFoundatuon preview layer hide those elements. Simple solution is to bring them to the top as subviews.
Thank you.

XCode Storyboard Issue

I cant see the Labels, Button etc in the View or their constraints though the Labels and Button appears on the side of the storyboard. And when you run the program in the simulator you can see that they are there.
The project from my colleague who uses XCode 6.3.1 and I am using XCode 6.3.2
and he doesn't have this issue. When he updated his to to the same version I have he had the same problem; so he went back to the previous version 6.3.1.
Now the problem persisted on my device even when I removed the 6.3.2 and substitute it with 6.3.1
stackoverflow prevented me from uploading the images but I can send it by email to anyone to see the screen shots
I think I found the answer but yet the labels seems to be shifted out of the view. but the Answer is: This problem occurs when one of the users design the view controller using the compact or any other dimension other than Any X Any. to fix the problem, click in any of the objects created ( label, button..etc), and go the attribute inceptor, and scroll down to the bottom and you will find a check box with the word installed. there will probably be more than one. Look for the one that is not highlighted, and highlight it. This should fix the problem.
Another faster solution instead of going over each object you can deselect
Use Auto Layout
Use Size Classes
then select them again

Xcode Storyboard Serious Issue Going Blank?

I know there are a couple other questions on StackOverflow similar to this one, but they have different results and circumstances. I have 1 Storyboard in my iPhone App (Tab Bar Application). It has a total of about 7 different UIViewControllers. Whenever I do anything (delete something, add an object) it goes blank, and all I have are gridlines. I have to completely click out of the storyboard file–onto a code file–and click to open the storyboard file again to make the contents show up. This is really frustrating and it is making me take twice as long on my work.
Unlike other questions, I only have one tab open and I am not doing anything else with the application, so closing other tabs does not fix my issue. I tried everything, but there is no way that I am going to take the time to create a new Storyboard file and relink all of the connections.
If anyone else knows how to fix this, please assist me. It would be so greatly appreciated. If anyone else has this issue please comment so that I can get an idea of how many have this issue (and that I am not the only one).
you may have to adjust the w h elements at the bottom of the Storyboard ... They got reset for me to wAny hAny when I switched to wCompact hAny it worked out.

Resources