Unwind segues give a way to "unwind" the navigation stack back through push, modal, popover, and other types of segues. use unwind segues to "go back" one or more steps in navigation hierarchy. Unlike a normal segue, which create a new instance of their destination view controller and transitions to it, an unwind segue transitions to an existing view controller in navigation hierarchy. use these callbacks to pass data between the view controllers.
Questions tagged [unwind-segue]
312 questions
1
vote
1 answer
Swift unwind issues, view controllers stack not updated
I unwind from controller B to controller A.
When I print my view controllers stack on my unwind function (controller A), I still have my controller B in stack.
Is it normal that after an unwind the controllers stack is not updated ?!
Controller…

Hiromi
- 209
- 1
- 3
- 12
1
vote
0 answers
Unwind segue not animating in custon swegue since iOS 13
I have an app that uses custom segue animations (based on https://www.appcoda.com/custom-segue-animations/). It has worked for years, but since iOS 13, the unwind segues aren't animating (black screen then just appears, instead of sliding in).
When…

coopersita
- 5,011
- 3
- 27
- 48
1
vote
1 answer
Segue and Unwind segue without UI element
I have been looking for an answer for this on SO without success.
I have UIViewController A and B. They are NOT linked in Storyboard, and I want to perform a Segue from A to B, and upon clicking a button in B, to activate an unwindSegue to A.
So far…

Ofri
- 289
- 5
- 17
1
vote
1 answer
UITabBar disappears after "Back" button
I have a UITableView with a TabBar .
When I click a cell it takes me to a new view, and when I click "Back"
I am back to the previous UITableView.
Only this time, the TabBar doesn't show. How can I make it appear again ?
Notice: The left-most view…

Ofri
- 289
- 5
- 17
1
vote
1 answer
When I go back to menu, the App crashes (Thread 1: signal SIGABRT)
I am almost finished with my App "AR Note".
There is only one bug I need to fix.
I have a main menu with 7 buttons linking to view controllers. To go back to main menu I use
@IBAction func unwindFromSources(segue: UIStoryboardSegue){
}
In my…
user10219864
1
vote
1 answer
Two ViewControllers unwind issue
I have three View Controllers and want to go back from the third to the first on button click. I do the following:
Add the target to my button: doneButton.addTarget(self, action: #selector(ThirdViewController.doneButtonPressed(_:)), for:…

Egor Iskrenkov
- 433
- 4
- 15
1
vote
1 answer
Push UIViewController with Alert without UINavigationController
I have a button in UITableViewController. when I press this button, alert controller appears asks if the user wants to go to the cart page or stay in the same page, as follows,
if user?.uid != nil{
let title = "Item is added to your cart "
…

Amal Nasir
- 164
- 15
1
vote
0 answers
Custom segue won't resize Subview
I am using a custom segue for transitioning from a collection view cell to a view controller with a kind of zoom in/zoom out style - pretty much like App's do it on the Homescreen, when you open/close them.
In the destination view controller I am…

ChrisTheGreat
- 512
- 4
- 21
1
vote
2 answers
unwind segue cancel upon textbox value equal to nil
I would like to cancel an unwind segue if the textbox values are equal to nil.
below is the current code. I used storyboard to connect the save button (saves values of text into database). I was thinking about using poptorootviewcontroller to…

Omar Al-Eisa
- 67
- 9
1
vote
1 answer
With storyboards, how can I perform a reverse segue to return to the previous screen?
Currently, I am working on a project which requires multiple screens. When I transition from one screen to another, the default transition when pressing a button is the next screen rising upwards to cover the previous screen. Naturally, when I press…

Jonathan Newman
- 15
- 4
1
vote
2 answers
iOS swift unwind 2 view controllers and show another one
I have 4 View Controllers (A, B ,C ,D). I can go from A -> B , B -> C. In the View Controller C what I want to do, Remove the B and C then show view controller D. so that If I go back from D it goes to A.
I want to perform this with a transition…

Bhanuka Yd
- 646
- 8
- 25
1
vote
2 answers
Unwind multiple navigation controllers
Say I have view controllers A, B & C embedded in a navigation controller. From C, I present a new navigation controller for a separate logical flow but need to return back to A upon completion. So the app flow is as follows: A->B->C -- present new…

user7804097
- 308
- 1
- 3
- 17
1
vote
1 answer
How to unwind to home, and then segue forward in one action
I want to tap the "Go To DestinationVC" button in the SourceVC, and have it safely unwind back home, and then segue forward via a different route to the DestinationVC.
I tried just calling a performSegue in side the unwinding segue…

Justin Lewis
- 534
- 1
- 5
- 22
1
vote
1 answer
Multiple unwind segues from a UITableView?
I’m currently building an app that uses the same countryPickerTableView in three different places with slightly different behaviour, so I would need a way to connect three different unwind segues to the tableview. The problem is that the cell only…

Diez Nobach
- 55
- 6
1
vote
1 answer
Unwind then segue without showing intermediate view controller
I have three UIViewControllers where A -> B -> C, and A -> D.
When the user is done in C I want to unwind back to A and then segue to D, but I cannot get this to work without briefly showing A before the segue to D happens. I have tried disabling…

Developer
- 736
- 7
- 30