I have an app that uses a Navigation Controller. When the user clicks the Back button in the Navbar the segue that initiated the view is unwound but none of the unwind methods are notified. I can't seem to find an official way to detect the exit in the leaving View Controller. I did find that
didMoveToParentViewController(parent: UIViewController?)when parent was nil did seem to indicate that the view was exiting.
What I need to do is remove the observers that I have set and close a bluetooth connection before I exit
But is there an "official" way to detect the exit?