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.
Interacting with UITouches
-
Hi all,
I was thinking UITouches and some cool things i can do with them. The problem is i don't know how to detect a touch ( in real objc i used touchesBegan but i dont think it is possible in pythonista).
Is there another way to detect touches?
Thanks in Advance,
Filippo -
Pretty sure @ProfSpaceCadet did this in his screen recorder.
-
True, more or less it is what i need. Any other way?
-
@filippocld Why doesn't his method work?
-
It works, but i was looking for more and simpler solutions. If this is the only way it's good :-)
-
I think you'd have to be a bit more specific about what you're actually trying to achieve...
-
Perhaps worth noting:
ui.Touch
can be "bridged" to ObjC, e.g. you could get access to aUITouch
instance like this:import ui from objc_util import ObjCInstance class MyView (ui.View): def touch_began(self, touch): ui_touch = ObjCInstance(touch) print(ui_touch) MyView().present('sheet')
-
Thanks, i didn't think about ui. The @ProfSpaceCadet example was goot but was a bit overkill for now.Currently I am experimenting with the ui method. :-)