0

How do I use the materialkit switch on and off in a case statement or in a if-else statement for a function? It seems that the UIcontrol and Material Kit has two different syntax.

Kyle C. Beachem
  • 51
  • 1
  • 10

1 Answers1

1

For Material, it is like this.

let materialSwitch = MaterialSwitch()

if .On == materialSwitch.switchState {
    // Do something
} else {
   // Do something else....
}
CosmicMind
  • 1,499
  • 1
  • 10
  • 6