I've encountered a situation where I will need to know which control in my UI is currently being interacted with. That's easy enough with custom Views I write myself, but I also need to know when the user is fiddling with a slider or button, so I thought I could maybe connect up a method which will be called whenever a touch event occurs on a real UIControl via:
addTarget:action:forControlEvents:
Using the appropriate control events from here:
https://developer.apple.com/documentation/uikit/uicontrolevents?language=objc
But I'm having trouble figuring out how to convert the call to that function into the proper objcutil code in python.
I have my, say, Slider control, and can get the actual objc instance of it, but I'm not clear on the right way to add a python function or method as the selector for the action to that addTarget_action_forControlEvents_() call, or how to access the UIControlEvents enum values.
Any help from more experienced objc_util users would be appreciated. Or if there's a simpler/better way to be notified when one of the wrapped native controls is being interacted with.