Created
March 10, 2017 17:12
-
-
Save gatesakagi/1f317aaf65a1fa10b19901b069f3d726 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
switch sender.tag { | |
case 0: //switchGood | |
if (sender.isOn == true) { | |
labelGood.alpha = 1.0 | |
if (switchFast.isOn == true) { | |
switchCheap.setOn(false, animated: true) | |
labelCheap.alpha = 0.5 | |
} else if (switchCheap.isOn == true) { | |
switchFast.setOn(false, animated: true) | |
labelFast.alpha = 0.5 | |
} | |
} else { | |
labelGood.alpha = 0.5 | |
if (switchFast.isOn == true) { | |
switchCheap.setOn(true, animated: true) | |
labelCheap.alpha = 1.0 | |
} else if (switchCheap.isOn == true) { | |
switchFast.setOn(true, animated: true) | |
labelFast.alpha = 1.0 | |
} | |
} | |
case 1: //switchFast | |
if (sender.isOn == true) { | |
labelFast.alpha = 1.0 | |
if (switchGood.isOn == true) { | |
switchCheap.setOn(false, animated: true) | |
labelCheap.alpha = 0.5 | |
} else if (switchCheap.isOn == true) { | |
switchGood.setOn(false, animated: true) | |
labelGood.alpha = 0.5 | |
} | |
} else { | |
labelFast.alpha = 0.5 | |
if (switchGood.isOn == true) { | |
switchCheap.setOn(true, animated: true) | |
labelCheap.alpha = 1.0 | |
} else if (switchCheap.isOn == true) { | |
switchGood.setOn(true, animated: true) | |
labelGood.alpha = 1.0 | |
} | |
} | |
case 2: //switchCheap | |
if (sender.isOn == true) { | |
labelCheap.alpha = 1.0 | |
if (switchGood.isOn == true) { | |
switchFast.setOn(false, animated: true) | |
labelFast.alpha = 0.5 | |
} else if (switchFast.isOn == true) { | |
switchGood.setOn(false, animated: true) | |
labelGood.alpha = 0.5 | |
} | |
} else { | |
labelCheap.alpha = 0.5; | |
if (switchGood.isOn == true) { | |
switchFast.setOn(true, animated: true) | |
labelFast.alpha = 1.0 | |
} else if (switchFast.isOn == true) { | |
switchGood.setOn(true, animated: true) | |
labelGood.alpha = 1.0 | |
} | |
} | |
default: | |
break; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment