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.
Related
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?
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
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.
I have a project in xCode 6 using Swift (my very first experience developing iOS Apps).
I was having problems with gestures (they are alive even after removing them from storyboard) and decide to delete the ViewController I was having problem. The program compiled as it still exists. Then I decide to delete and remove reference to file main.storyboard and everything works just as before.
I believe that is related to source control
Where are those view controllers and even the storyboard stored?
By using the storyboard, sometimes you are creating some link between your elements and/or some part of your code.
These links will still be, even after deleting the element unless you delete the link itself.
In order to perform good deletion, you should first right click on the element you want to delete and suppress all its links. Then you can safely delete your element:
I have some code which brings up a table view in an iPhone app I'm developing. I was attempting to rename the xib file which holds the table display, but after I did it the display table showed up as blank, or rather, with two very large blank lines separated by the normal separators.
My (primitive) backup strategy is to copy the directory folder containing the xcode project. However, when I tried the backup, I get the same result. None of the previous backups before that one work either, until I get to the one before the current enhancement.
Is there something about a project that is preserved by XCode itself, regardless of the directory? What's the best approach to debugging something like this?