Closed kostiakoval closed 9 years ago
UIStoryboardSegue.selection()
is actually workaround for weird switch
statement behavioud. I think it will be fixed in Swift over the time.
Today preferred way to handle prepareForSegue()
with Natalie is:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue == MainViewController.Segue.ScreenOneSegue {
/* ... */
}
}
See related: https://twitter.com/krzyzanowskim/status/611686899732869121
If there is more that 1 view controller with segue, the Swift can't find which to use Steps:
Result:
This code won't work. To make it work I need to manually specify type.