In Swift using iOS I used to be able to do:
if mySwitch.on {
myLabel.text = "The Switch Is In The On Position!"
}else{
myLabel.text = "The Switch Is In The Off Position!"
}
but how do I do if mySwitch.on {} in WatchKit Swift
I saw on apple it told me if mySwitch.setOn(on: Bool) but how do I check to see if 'mySwitch' is in the off or on position.
Does anyone know the correct boolean method?
Thanks,
George Barlow
Aucun commentaire:
Enregistrer un commentaire