I have a switch view on my UI and I’d like to handle the event when its value is changed. To perform this I’ve made an IBAction method to handle value changed event. So far so good.
My problem is I can’t decide if change was performed by
– code (it may happen in my app)
– user interaction
How can I decide if it was changed by a user interaction or by code?
Is there a specific method that changes the switch value when it’s done by code only? If so, maybe you could use that method to set a boolean/flag to check against when you need to decide/handle the event.