A
A
Alex Bro2019-06-10 11:17:11
Swift
Alex Bro, 2019-06-10 11:17:11

UISwitch turn off all when one is on, how?

If one of the switch isOn == true, then the rest should turn off, how to implement in a function?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Vorobei, 2019-06-10
@AlexeyBro

Collect all UISwitch in an array. Switch one, remove it from the array. For the rest, use forEach to turn it off.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question