Hello everyone, I'm facing a problem that I can't connect the button to the unwind segue.
I have made a simple application with three controllers.
The unwind segue code is located in Table View Controller.
@IBAction func unwindToTableViewController(_ unwindSegue: UIStoryboardSegue) {
let sourceViewController = unwindSegue.source
}
A first segue has been implemented from the Add button on Table View Controller to the View controller. It is a Push type.
There is a Save button as Bar Button Item in the View Controller.
When I try to drag a connection from Save button to the Exit icon of the View Controller, the context menu does not open indicating the unwind segue. Instead, a context menu appears with different types of segues.
At the same time, if I just click the Exit icon, a context menu appears where the unwind method is visible.
Just in case, I re-read the documentation again and looked at examples of using the unwind method. There is no mention of this problem anywhere.
The only hypothesis left is that this problem is related to the new version of Xcode.
The example of application given here was created in XCode 15.3. I have tested the same application on another computer, where the version of Xcode is 13.4.1. There, when I try to drag a connection from the Save button to the Exit icon, a context menu appears with the name of the unwind method.
But the problem didn't end there because after the connection is established, the button does not work and the View Controller does not dismiss.
I can't understand why this is happens. It worked before. Is that one a bug or the feature?
How to fix it?
Any ideas would be greatly appreciated!