Segue identifier not showing in attributes inspector - ios

I go to click on the segue in my storyboard and nothing shows up in the attributes inspector.. why would this be? All I ask for is to identify this segue in code. Can someone help me? I have x-code version 5.1.1.
EDIT: OSX Version : 10.8.5

There is a show/hide button next to "Storyboard segue", conveniently someone thought it was good UX to hide it, so just hover your mouse near that area and your will see it.

In my case i managed to solve the issue (Solution for “NO SELECTION”) for XCode 7.2 as follow :
Select another file (which isn’t an Interface Builder type) in the
current tab with the issue.
Open a new tab and select the Interface Builder file which was having
the problem.

Related

How does one remove a IBAction link to main.storyboard

So I have this weird Problem where I have 4 UIButtons in my App not working at all, even though i have double checked on having them correctly linked to the Storyboard. So i tried to disconnect and reconnect them but the icon indicating that its linked didn´t disappear. So I checked what else the function is linked to and it seems somehow it got linked to the main.storyboard, and i guess for that reason, these are the only ones not working.
So I tried to disconnect it from Main.storyboard, but to no success so far.
How can I remove a connection to the storyboard as sender and why does it appear in the first place?
I too did it accidentally for a button.
Connected a correct segue to the button and accidentally connected one more to a UICollectionView and I was getting this :
Checked the storyboard on right clicking the button :
and found the two outlet connected. Removed it on clicking the cross icon and it worked.
If you click on the connection showing in UIViecontroller it will not redirect here.
you can also check all the connected referencing outlets here:
So i fixed the Problem by copying the code to another file and only "rewriting" the functions that were linked to the given problem.
All i could find to this problem was some old answer that explained that the link referrs to a ViewController that the Code originates from: https://stackoverflow.com/a/37324993/10160115
Even though the Code i wrote is not copied it seems that XCode has created exactly such a referral to the storyboard it was linked to, so it linked the function to itself but couldn´t find any Button to link it to so it just linked it to nothingness.
It fixed the problem and the buttons work the way they´re supposed to be now but it´s a weird way of fixing this, but since there seems to be no connections inspector for the storyboard itself i wouldn´t know how else to fix this
To solve this problem you should (for macOS Catalina 10.15.4, Xcode Version 11.1):
Close your project and close Xcode
Open /Users/XXXXX/Library/Developer/Xcode/DerivedData and delete your cache of project
Open /Users/ХХХХХ /Library/Developer/Xcode/DerivedData/ModuleCache.noindex and delete all cache from this directory
Open your project again and click Product > Build

Unable to connect object with outlet in Xcode with automatic like below

I am facing problem to connect an object with outlet so when i open assistant editor there are no related file found on automatic...why NSObject file showing always.
Right where Automatic is highlighted, to the left of that there is an arrow, clicking that solved my issue
Because the storyboard don't have equivalent for automatic.
You have to select manual and navigate to the desired source file

Xcode shows two windows side by side

Hello My xcode is showing the screen in half and also not showing storyboard interface builder. below is the screenshot
I have tried to reset the xcode settings as well
defaults delete com.apple.dt.Xcode
But it didn't work. Please tell me how can I fix this
These three buttons up here switch your view. Select the left one.
You're actually stuck in the version editor (which looks at your version repository compared with your current code.)
Because storyboard UI can't be viewed with the interface, it shows the underlying xml.
Also the keyboard shortcut is command + enter (credit to farzadshbfn)
Try click on "Show Standard Editor" button:
Main Storyboard > Right click > Open As > interface Builder - Storyboard
Click First button to show your view controller.

Error in storyboard

I am having some annoying error in xcode 6.1 for storyboard.
Also not able to open storyboard to make changes.
any idea How to Fix it?
Right click on the storyboard and chose Open as --> Source Code, then you can go to line 14955 and chase the error :)

StoryBoard Assistant Editor stopped showing associated file

Xcode storyboard assistant editor stopped showing related files.
"Automatic" is selected and "Class" is filled in Identity Inspector.
It was working before, but know it has stopped.
"Auto" or "CounterPart" modes are still woking for other files except StoryBoard.
A few days ago, I tried to update from Xcode 5 to 6, but later on gave up.
Would that have something to do with it?
With XCode 11 onwards, you can option(alt) + click on the file that you want to view in assistant editor.
Simple Fix.
Found the solution (at least worked for me), it's the same bug that causes you not to be able to create new outlets. You must delete the [DerivedData] folder:
Close the project you are working on with.
Delete the【DerivedData】folder of you project. (This folder may inside your project's folder, or inside
~/Library/Developer/XCode/DerivedData/(your project)/ ) or somewhere
else that were setup by you.
Restart Xcode.
see here.
In same case this worked for me:
Right click on ViewController file(on left pane) and choose Delete -> Remove Reference.
Right click on folder where this ViewController file was and choose Add files to .. and add this ViewController file which your just deleted.
Profit.
Deleting the Derived Data didn't work for me nor force quitting Xcode and restarting it.
The only thing that worked was deleting both the class and the storyboard (only the reference to them) and adding them back to the project.
Hope to help someone.
If anyone is wondering how to find Assistant editor in XCode 11 then
please find the steps from the below image. You can show this options
in storyboard or Xib files on upper left corner.
Maybe it's too late but just with the keyboard, you can launch a reset for associated files.
Use the keyboard :
command + option + shift + z
You can find it in the menu Xcode->View->Assistant Editor->Reset Editor.
Click first on the assistant window, then click on 'option'+'alt' and right click on the view controller that you want.
I have Xcode 13.1 and none of these solutions is working for me, but this simple solution works for me every single time. With your Storyboard and (empty) Assistant Editor open, in the upper right of the Editor window click the "Add Editor on Right" icon Editor On Right Icon, and just as promised, it will open a new editor to the right of your Storyboard and (broken) Assistant Editor, only the Assistant in THIS window will be working! Just find the "Close Window" x on your broken editor, close it, and in its place will be your shiny new working Assistant!
Full Editor View of where to click to open the new Editor On Right
Tried all the above methods whereas after simply running the app Command + B fixed this issue and I was able to select the screen under automatic.
This command on terminal fixed my issue:
defaults write com.apple.dt.XCode IDEIndexDisable 0
simply exiting and reopening Xcode worked for me.
For Xcode 8+ versions
Check at top process indicator that if Xcode is "indexing" files... if yes, then, please wait until it finishes. Once it get finished. Your file will automatically appear as counterpart in Automatic section.
If Xcode is not showing "indexing" in process bar, then perform as #Anna Chiara's Answer
I deleted ~/Library/Developer/XCode/DerivedData -> didn't work
Xcode->View->Assistant Editor->Reset Editor is disable
Finally, I figured out that the class name of File's Owner of .xib file is incorrect (the class doesn't exist). I corrected it and Assistant Editor works again.
Hope this helps you
I had the same problem. Finally this is what worked for me.
Changing the name of the ViewController File.
Change the name of the class to the new name via the Refactor tool
Refactor tool
The only thing that ended up working for me was copying over the code from the offending ViewController files and completely deleting them, then creating new ones with the exact same name and pasting in the previous code.
The assistant then linked up to the new ViewController files with no issue.
None of these answers worked for me w/ XCode 13. However, the following worked:
Rename the ViewController class to ViewController2
Update the reference in the storyboard to ViewController2
This made the assistant editor appear.
Change the name of the class back to ViewController. Change the reference in main.storyboard back to ViewController and hit enter (Step 2)
I had same issue and spent almost 2 hours of trying different aproaches finally I found something to solve problem.
I've created two or more VC at the same swift file and I think that's why IDE confused about the files.
So I suggest that you should delete your viewcontroller class and clean than reassign class.
I hope it works for you too.
For what it is worth, this was happening to me for the last couple days on 9.3 . I had just added a new build schema for an alternate debug symbol on testflight. It was not until I removed the new schema and then deleted Derived Data and restarted did it start working again. I have re-added the new schema back in and it continues to work. Not sure what the issue was, but that is what solved it for me.
In case anyone is watching I had a bizarre instance of this (Xcode 11): I deleted a View Controller that I'd done incorrectly; dropped in a new one, created the UIView and associated. BUT I didn't bother to create the outlet from the View Controller on the previous screen. Strange that it let me work for a few minutes, then after I had turned off the assistant editor to do something else, turned it back on and only had the UIResponder.h file. Edit - this happened again. Had to delete the 'wire' to the next screen, then recreate - then option to get to the correct .m and .h files reappeared.
I faced a similar issue and here's what I did
I had a swift file and a xib file with its class connected to the swift file like so inside a group folder, and it doesn't show that they're connected.
But when I take them off the folder the assistant works somehow, so I took them off the folder and made an outlet from a UILabel then put them back inside the folder then they're permenantly connected.
Quite Xcode and reopen it. This is solve my problem.
I had the same problem. But my problem was about having the VC's under "View Controller" folder. When I move VC's to main folder instead of "View Controller" folder, I was able to reach the assistant without problem. If you have the same issue like mine, you can solve by deleting all the VC's and create again under your sub folder.
Just add the Class on right side of your story board which you want to open in assistant

Resources