Hi everyone,
An application has a Tab Bar Controller, two navigation stacks with navigation controllers, and two view controllers in each stack. In each navigation stack, the first view controller is a List of items, the second is the Detail screen, where I can edit an item from the list.
The first navigation stack is Items, the second one is Orders.
I can navigate inside this or that navigation stack using segues. But in this case, I need to move from one navigation stack to another. And to do this not with the help of a direct segue, because this is an incorrect method and it creates certain problems, but through the Tab Bar Controller.
For example, to start to create an order, I can go from VC2.2 to VC1.1 using an index:
tabBarController?.selectedIndex = 0
And how to return back from VC1.1 to VC 2.2 via Tab Bar Controller and pass data?
Selecting any option will automatically load the page
Post
Replies
Boosts
Views
Created
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!
Hello, forum admins.
Thank you for your work in maintaining the forum in an active working condition.
I have a question for you. Is it possible here, on the forum, not only to ask questions and get answers, but also to conduct technical discussions on current programming issues?
For example, I would like to publish an article on design programming patterns and hear the opinions of other programmers working in this direction.
I know that there are resources where we can publish articles. But here is the most big and active community of programmers using Apple technologies and it would be great to have the opportunity to publish articles here and organize thematic discussions.
Best regards,
John
Topic:
Developer Tools & Services
SubTopic:
Developer Forums