uistoryboardsegue - Swift: programmatically enumerate outgoing segues from a UIVIewController -


i want list outgoing segues uiviewcontroller, described in programmatically enumerate outgoing segues uiviewcontroller, in swift. (swift 2, xcode 7, ios8+).

i can do

override func viewdidload() {     super.viewdidload()     let s = valueforkey("storyboardseguetemplates")     print("switchingvc: segues: \(s)")  } 

and produces output like

switchingvc: segues: optional((     "<uistoryboardpresentationseguetemplate: 0x1754a130>",     "<uistoryboardpresentationseguetemplate: 0x17534f60>",     "<uistoryboardpresentationseguetemplate: 0x17534fc0>" )) 

but struggle produce after that. can't find definition of uistoryboardpresentationseguetemplate. how can persuade swift tell me what's inside it? how can find segue identifier?

thanks!

this valueforkey("storyboardseguetemplates") undocumented property , uistoryboardpresentationseguetemplate undocumented class. beware of rejection app store if uploading application app store.

if want use in in-house projects, use following

for template in (valueforkey("storyboardseguetemplates") as? [anyobject])! {     if let identifier = template.valueforkey("identifier") as? string {         print("identifier - " + identifier)     }     else {         print("no identifier \(template)")     } } 

found https://github.com/javisoto/ios9-runtime-headers/blob/master/frameworks/uikit.framework/uistoryboardseguetemplate.h


Comments

Popular posts from this blog

Hatching array of circles in AutoCAD using c# -

ios - UITEXTFIELD InputView Uipicker not working in swift -

Python Pig Latin Translator -