IBDesignable functionality has always been a bit iffy, but in Xcode 13 and 14, they don't seem to work at all. I have several IBDesignable classes that build perfectly fine, no crashes in the build server or anything like that. On first launch, Xcode loads all the current IBDesignable views existing in a xib or a storyboard, but any newly-placed views just don't load. The view remains a blank white view.
The only thing I can tell that is going on is that, in the "Report navigator", there is an "Interface Builder" step that is going and just spins forever. I imagine that means the IB build just never finishes, though there are no errors or warnings generated. The only way I've found to get the IBDesignables to refresh is to quit and restart Xcode, but that's untenable. Does anyone have any ideas on how I can get these working again?
Related
I am using XCode 6.4. I have quite a big Storyboard, and sometimes, when I open it, lots of warnings appear out of the blue, saying I have misplaced views, without touching anything. Everything was fine before, and the misplaced views are in every single viewcontroller. I add most of the constraints manually.
Any ideas what I might be doing wrong, or why suddenly everything moves?
EDIT
I pull from the repo, open XCode, and then all the warnings appear. If I git status, the storyboard has changed.
The difference between the versions is on the systemVersion attribute on the Storyboard. That change probably happens automatically when someone else with another configuration opens the project and then commits the changes.
This (long) question is related: Xcode changes unmodified storyboard and XIB files. However, my problem is not on the class attribute, but on the systemVersion
I have a xcode project with buttons and other objects in it. But the objects are all greyed out in my view now. The project still compiles and shows the buttons fine. I saw posts about using auto-layout, changing size-classes, and modifying the IB. But whenever I make any of those changes, a lock icon shows on the screen and nothing changes. I can go back to an old version of my code, but I'd rather find out what will fix the issue.
What was I doing to break it? I was just exploring through the different xcode windows and views, and don't know exactly when the viewcontroller objects became affected.
My application was working fine on the Simulator yesterday, today not so much. It shows a black screen consistently, however it deploys and runs fine on device. I've tried so far: resetting the Simulator content and settings, clearing derived data, clean building, ensuring that the Main storyboard is set as the Main user interface, restoring from git to a much earlier build in case something else had broken, restarting both Xcode and Simulator.
Is there something I've missed?
So to fix it I had to go into General for the target, remove the reference for my Storyboard from Main Interface, build it and run it, and then read the reference. I'm assuming that something was broken in the build process which running a Clean didn't fix.
I have seen simialr posts on this issue, but none of the answers have worked for me.
When I make changes to xibs in Interface Builder, they do not show at runtime. So far I have tried the following:
Clean
Clean Build Folder
Reset Content on Simulator
Restarted XCode
Restarted the simulator
I've tried all of these steps in about every conceivable order, but still no changes in IB can be seen when I run the app. Earlier today, my changes were showing, so I do know that the xibs are definitely loading. I believe something has gotten hosed in XCode, perhaps? Any suggestions?
I have an xcode project for an app I am in the middle of developing. Recently I saved my xcode project, and then moved a single button using the arrow keys, somehow causing xcode to crash. Several re-opening attempts failed, as I saved just prior to the crash, and xcode would then simply crash upon opening.
After restarting the computer to no avail, I opened the project in xcode 5 developer preview, didn't upgrade the app to xcode 5, and then was able to open it in xcode 4 again. However, for some reason a bunch of IULabel I had created with important text were missing. After closer inspection, I found that I had some UITextFields that were also missing. When I inspected the connection in my header file, I could right click the outlet and select the UITextField. It turns out the X coordinate was set to -345, so it was missing because it was out of my view.
I suspect all of my missing UILabels are similarly out of my view, but since they aren't explicitly connecting to my header, I have no way of selecting them manually, and I can find any way of searching for them or selecting them, since they are out of my view.
Does anyone know how I might be able to select these missing UILabels so that I can change their faulty X coordinates?
Thanks!
All UI elements you have used in your storyboard/xib should be available in the left sidebar of the interface editor.
If the sidebar is not visible you have to click the little round button at the bottom.