Swift: programmatically enumerate outgoing segues from a UIVIewController
问题 I want to list the outgoing segues from a UIViewController, as described in Programmatically enumerate outgoing Segues for a UIViewController, but in Swift. (Swift 2, Xcode 7, iOS8+). I can do override func viewDidLoad() { super.viewDidLoad() let s = valueForKey("storyboardSegueTemplates") print("switchingVC: segues: \(s)") } and that produces output like switchingVC: segues: Optional(( "<UIStoryboardPresentationSegueTemplate: 0x1754a130>", "<UIStoryboardPresentationSegueTemplate: 0x17534f60>