I have an unwind segue question.
I have two View Controller, "main" and "about". I want to achieve the following simple actions:
- When a button (A) on "main" is clicked, the "about" view is showed.
- When a button (B) on "about" is clicked, the "about" view is gone and the "main" view is returned.
I didn't use any navigation controller. What I did is as follows:
- Create a "Show" segue from button (A) to "about".
- Customize the UIViewController of "about" view controller and create an IBAction func unwind(s: UIStoryboardSegue). Only one line of code is in it: print("unwind")
- Control-drag from button (B) to "exit" button on "about" view controller and link up the unwind segue to the unwind func.
However, when I click button (B) on "about" view, the print is not triggered, nor the "about" view unwinds.
I have no idea what's going on here and would like some help. I am on xcode 7, using swift 2 under iOS 9.
Thank you.