Is there a way to abbreviate the following type of condition in Swift?
if ( (myEnum == .1 || myEnum == .2 || myEnum == .3 || myEnum == .8) && startButton.isSelected )
I tried typing:
if ( (myEnum == .1 || .2 || .3 || .8) && startButton.isSelected )
and:
if ( (myEnum == .1,.2,.3,.8) && startButton.isSelected )
but none of those worked. I also tried looking at documentation but can't find a similar example.
Thanks!