Last active
August 29, 2015 14:08
-
-
Save tomkowz/1dd428fd6a58b6c52c17 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum SegueIdentifier: String { | |
case SegueToRedViewIdentifier = "SegueToRedViewIdentifier" | |
case SegueToGreenViewIdentifier = "SegueToGreenViewIdentifier" | |
case SegueToBlueViewIdentifier = "SegueToBlueViewIdentifier" | |
} | |
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) { | |
if let segueIdentifier = segue.identifier { | |
if let segueIdentifierValue = SegueIdentifier(rawValue: segueIdentifier) { | |
switch segueIdentifierValue { | |
case .SegueToRedViewIdentifier: | |
println("red") | |
case .SegueToGreenViewIdentifier: | |
println("green") | |
case .SegueToBlueViewIdentifier: | |
println("blue") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment