I need a fast optimal way to create if else statement that checks string vs multiple strings
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == "ANY OF MULTIPLE STRINGS 'x1'-'x9'"{
let JVC = segue.destinationViewController as VC3
JVC.betSource = segue.identifier!
} else {
let KVC = segue.destinationViewController as VC2
KVC.source = segue.identifier!
}
Should I use an Array:string, do 9 different if/else or something completely different?
I don't know what would run the code most optimally. Please advise