Xcode storyboard discrepancies across version control - ios

I am having quite the annoying problem with my Xcode storyboard. I have a project controlled through svn version control and everything seems to be copying over fine with the normal merges and commits. When I make a change to the storyboard and commit it, say just a dummy label, and my partner updates his project with the latest commit it shows up fine, just like it is on my own project. However, when my partner adds a dummy label and commits, my update does not show the project on the screen. It only shows the label on the scene viewer. This is also happening with tableviewcontroller's inside of other view controllers, or really anything that he updates. When the app is run the app shows everything that it is expected too, but this does not make sense as the storyboard file is not showing these things. I am not sure what is happening as nothing seemed to be wrong early on. Any help or guidance is appreciated. Here is a picture detailing what I mean.
http://imgur.com/MkJIuhC
If you would like more info about this please leave a comment!

Looks to me like you just need to update the size class when you or your partner opens up your project like so:
and choose whatever size you find appropriate for your app

Related

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?

Storyboard corruption on file open

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.

Xcode building "old" code after a pull

I have a single view App. very basic not much going on right now besides networking code.
Earlier in the day I committed changes to the main view (added buttons, text fields, styling). I did this by copy+paste -ing from an old project. Everything worked as I expected.
Now, I am on a different machine and pulled the changes in. The App is building with the "old" view (just a single button). Why is it not showing the changes that I made, and were working, earlier?
EDIT: its not just the view that isnt updating. Its running all of the old code from my previous commit. Again, the problem is that I have all up to date files.
this is a Swift app, if it matters.
Deleting the build folder in my project directory fixed my problem.
It sounds like your changes didn't get committed/pushed for some reason. Maybe the XIB/storyboard isn't under source control.

Using GitHub with XCode 6.2 causes Storyboard UI Elements to Disappear

My partner created a project in XCode and committed it to GitHub. No new changes were made. When either of us tries to bring down the project on our computers, the Storyboard appears to be missing every single UI element (UITextField, UIButton, UILabel, and UITextView). The View Controllers show up, but all of them are empty / blank. In the list view, the elements are there but are grayed out. The project still runs perfectly. If I try to open the Storyboard with an external editor, it still exists as an XML file. Apparently, the elements are still there but they simply fail to show up when the Storyboard is displayed. We are both using the latest XCode, Version 6.2 (6C131e). My partner just upgraded to the latest version of Yosemite a couple of days ago, and I am running OSX 10.9.5. The code is in Swift.
It is because your Size Class enabled. And for size class enabled, you can valid some of the elements and constraint at certain size. If you change the size at the bottom, they will be shown(not grayed out)
After the problem happened again, I fixed it the same way as above with the Size Class set to Compact/Any, and this time did a force commit on ALL files even though Git didn't seem to think they needed to be uploaded. That time when I checked the project out again, I could see the UIElements in the Compact/Any without having to change it back to Compact/Any again because it was already showing that way.

Storyboard randomly modifying contraints

Every now and then I notice my storyboard has changes ('m' beside it). I run my app and find that my views are out of position. If I check the difference between the previous and current versions of the Storybaord XML in the version editor it appears that Storyboard has made changes when I have touched nothing in the file. I have to discard these changes to get things working again. I have to admit that my layout contains warnings. It's incredibly complex (lots of views) but it works and this particularly layout only contains warnings, no errors. Has anyone else noticed this behaviour? It's incredibly annoying. I can fix it by discarding the changes but that's not exactly ideal.
I've been working with storyboard for quite some time. I've faced the issue of getting 'M' besides storyboard. What i did is set the layout constraints correctly and removed all warnings related to auto layout from storyboard but it is not necessary to remove them what i realised later. You just commit the code as you will be using git copy. Once commit is done 'M' will be gone. The reason you are getting 'M' even if you didn't touch the storyboard after you've set layout with constraints can be due to three reasons.
1.) You might be working on local copy and while creating the project you might not have unchecked the git repository.
All you need to do is uncheck while you create new project.
2.) If you are working on source of svn, then you need to commit your all the files along with your storyboard.It will remove the 'M' displaying besides your storyboard.
3.) Every time u open your storyboard the id in xml changes so due to this reason u r getting 'M' besides storyboard.

Resources