【发布时间】:2016-01-28 11:25:21
【问题描述】:
我想列出来自 UIViewController 的传出 segue,如 Programmatically enumerate outgoing Segues for a UIViewController 中所述,但在 Swift 中。 (Swift 2、Xcode 7、iOS8+)。
我可以的
override func viewDidLoad() {
super.viewDidLoad()
let s = valueForKey("storyboardSegueTemplates")
print("switchingVC: segues: \(s)")
}
这会产生类似的输出
switchingVC: segues: Optional((
"<UIStoryboardPresentationSegueTemplate: 0x1754a130>",
"<UIStoryboardPresentationSegueTemplate: 0x17534f60>",
"<UIStoryboardPresentationSegueTemplate: 0x17534fc0>"
))
但在那之后我很难产生任何东西。我找不到UIStoryboardPresentationSegueTemplate 的任何定义。我怎样才能说服 Swift 告诉我里面有什么?如何找到转场identifier?
谢谢!
【问题讨论】: