I have a SegmentedControl
on my Page
and I want to call methods on a C++ object when the selected value has changed. Each selectable Option
has its own method to call.
I need to know if the Option
was set by touch or by code, because if the method execution fails, I want to set the old value by code.
Example:
- I set
Option
B by touchOption
B's assigned method gets called- the called method succeeds
- I set
Option
B by touch
How can I detect if the Option
has been set by code or by touch?