text: Had an amazing morning with Morning Reset by Camp Reset and dancing my butt off from 7:30 to 9:30 am after practically getting zero hours of sleep due to some personal stuff swirling through my head endlessly.. but I digress.
  Went through a bunch of work and hit my limit, but learned a lot. The big thing that was learned today involved using something I’ve never used until today, UISwitch.
  In addition to this stuff, I went through exercises playing around with range operators and logical operators in Playgrounds.
  Anyway. Here’s the app (assets provided by Bitfountain):
  import UIKit class ViewController: UIViewController { @IBOutlet weak var demoSwitch: UISwitch! @IBOutlet weak var switchStateLabel: UILabel! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. view.backgroundColor = UIColor(patternImage: UIImage(named: "UISwitchBackground")!) print("the initial value of the switch is \(demoSwitch.on)") } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } @IBAction func changeSwitchTapped(sender: UIButton) { let yellow = UIColor(red: 255/255, green: 209/255, blue: 77/255, alpha: 1) let brown = UIColor(red: 108/255, green: 76/255, blue: 73/255, alpha: 1) if demoSwitch.on { demoSwitch.onTintColor = yellow demoSwitch.thumbTintColor = UIColor(red: 87/255, green: 175/255, blue: 63/255, alpha: 1) } else { demoSwitch.tintColor = brown demoSwitch.thumbTintColor = brown } } @IBAction func demoSwitchTapped(sender: UISwitch) { print("The switch was tapped, now it is: \(demoSwitch.on)") let purple = UIColor(red: 189.255, green: 81/255, blue: 222/255, alpha: 1) sender.thumbTintColor = purple } }