Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Switch in ui module unresponsive
-
Pythonista 2.0
I am new to the ui module. I've been messing around with it and I've figured out basically how to create user interfaces, but I can't, for some reason, figure out how to use switches. I have a switch in a ui view with an associated function. The problem is that when I tap the switch, nothing happens. The switch doesn't change positions. Why is this happening?
-
Does this switch work?
import ui ; ui.Switch().present('sheet')
-
-
That's weird. I re-added it and deleted it several times, and it worked on the fourth attempt. I don't know what I did.
-
@disorientedp , the only thing I can think of , is if somehow the switch was obscured by another view, hence not receiving the touch event. Or you added it to another control as a sub view such as a label. Label, by default does not handle touch events, but you can change that in code