I would like to implement the following: (I am using navigation controllers)
View A has several options which determine which path to take. The first displays view B which will then display View C using navigation controllers. The tool bar's first item performs a unwind to View A. Which works. The second item in the tool bar, I would like to unwind not only to A but redirect to View E.
The code in A view controller looks like this:
@IBAction func unwindToHomeController(segue: UIStoryboardSegue) {
self.performSegue(withIdentifier: "toPerson", sender: self)
}
When I click on the second item in the tool bar, View E is displayed but view A is immediately displayed after a brief delay.
How do I stop the display of View A?
Perhaps there is a better way.
You need to wait the animation finish to performSegue to E:
UPDATED To avoid the flashing showing A while pushing E
1) Remove the unwindToE function:
2) Create a custom segue:
3) Update the segue to MyUnwindSegue in storyboard (make sure the Module is selected to your project module rather than empty):