-1

I am using unwind segues in my app to dismiss multiple VCs and return to the original one. The unwind segue works but it freezes the UI for 2 sec when i press the button that triggers it. In the unwind function I do not have anything it is empty so it could not be the cause for the freeze. Please let me know what could be the cause and the solution. Thanks!

  • I have discoreved it only freezez if I open a particular VC in the chain and then do the unwind to close all of them. Still not find the cause though – Mihai Manea Jul 09 '20 at 16:54

1 Answers1

0

Found the problem: one of the VC had a viewWillAppear function that was preparing the cammera so when I was dismissing all the VCs with the unwind segue when it reached this particular one it was executing the ViewWillAppear function. I fixed it by adding a condition in the function when going backwards and now the 2 sec freeze is gone!