I'm finding that I'm having to declare the same string value for segue identifiers twice:
Obviously this opens up many potential issues with typos and what not between the two string values.
What I'd like to do if possible is to define my segue IDs once in a plist file and then reference that same definition twice in the the two places listed above. Of course I know it is possible to reference in plist value in Swift but is this possible in the Storyboard attributes inspector?
I don't think that's possible, but I have two alternatives for you:
Use something like R.swift. This tool will parse your Storyboard and create constants you can use in code
Instead of identifying a segue by its identifier, do it by its destination controller.
Example:
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let controller = segue.destination as? MyViewController {
controller.value = self.value
}
}
Personally I use number 2, I very very rarely read the name property of the segue