The Apple API docs indicate that segueForUnwindingToViewController()
is deprecated and that I should use unwindForSegue()
instead for use with a custom segue. I found this post but they still appear to use "segueForUnwindingToViewController()".
I'm not sure how to properly use the unwindForSegue()
because segueForUnwindingToViewController()
took the following arguments
- toViewController
- fromViewController
- identifier
and returned a "UIStoryBoardSegue". E.g.
override func segueForUnwindingToViewController(toViewController: UIViewController, fromViewController: UIViewController, identifier: String?) -> UIStoryboardSegue? {
return MyCustomSegue(identifier: identifier!, source: fromViewController, destination: toViewController, performHandler: { () -> Void in } )
}
How do I pass my identifier and create my custom segue instance using the new unwindForSegue()
?