When I ctrl-drag an object from the storyboard to code in the assistant editor I get this error:
I've googled the hell out of this problem and tried every suggestion that I could find. I restarted XCode, restarted my computer, updated XCode, deleted and re-added files, etc. and nothing is working. I saw suggestions to manually write the code and then drag from the circle in the gutter to the object I want to connect to in the storyboard. This would be a fine solution, but for some reason the outlet isn't showing up.
Normally the outlet would be to the left of the line number in the gutter
I am not sure what to do at this point except cry. If anyone has any suggestions or help to offer that would be greatly appreciated.
Related
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...
In the image see the highlighted portion .swift(Interface), When I get this it makes me unable to drag and connect from storyboard to viewcontroller class.
I have searched but not getting any clue that what is the issue behind this.
Can anyone help regarding this?
I have tried, clearing cache, cleaning the build, restarting the MBP etc but nothing helped.
I am unable to solve it out.
Rather than choosing "manual" and selecting the interface, you might use "automatic" and when you select the control in IB, you should see the actual .swift file (not the interface) in the assistant editor, and you should be able to control-drag at that point.
And you didn't mention it, but if you ever have troubles hooking up outlets, double check that the base class has been properly set in IB before you try hooking up outlets.
This is a Xcode bug, update to 8.3.2 to see if it fixes your problem (it doesn't show up on the app store update sometimes, so manually download it)
I was trying to rename an app like I regularly do. I go to the project title at the top left, double tap, and rename the app.
It usually works. However, this time, I have come across a Signal Sigabrt. I tried renaming the project only, but that doesn't work. All of the connections seem to be correct. Here is my error.
This is the first time I have come across a Signal Sigabrt for this reason. Could someone show me what I am doing wrong? Thanks.
Update
When I keep the name of the project the same as the original one, the app runs fine. If I change it to the new one, the app crashes. What should I do?
The screenshot you posted indicates problem in one of your Interface Builder files. Most likely the outlet connections defined there are not correct anymore.
This is a long shot suggestion, but have you been adding and removing objects to the view, or creating and renaming your Outlets? Sometimes this can result in outlets in the xib file which no longer exist in the header or implementation files (I can't explain why this is, although I'm sure there's a reasonable explanation.)
In any case, with the Interface Builder open check the Connections Inspector, which is the button all the way to the right in the Utilities panel. Make sure there are no lingering outlets or actions over there which are not linked to any objects. You may need to cycle through the objects in your view,even the view itself, to make sure you aren't missing any. If there are any of them listed, delete them and try to run the app again.
Hello and thank you for the help :)
I was working on xcode and everything was working fine.
I dont know what i did but suddenly the storyboard stopped working normaly.
What happens is every time i add a new ViewController or any item to the storyboard it freezes in the position where it was dropped i can add buttons and move the buttons in the view.. but i cant move the view itself on the storyboard.
The curious part is that now every project that i have even the new ones.. the same happens.. i dont know what i did and i tried eveyrthing i found on google to fix it.. but nothing worked. anyone has any idea of what it can be?
thank you very much,
Sérgio
Maybe there's some corrupted file in Xcode. Have you tried to delete and reinstall Xcode? Sometimes, that is a solution.
Good luck!
In addition to #ajpallares answer, did you also clean the cache?
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.