I want to perform an action when user turned off or on by dragging the view and I don't want it to stop in middle.
Any Idea how to achieve this?
to perform dragging, you have to use motion layout for it, Click here for more reference.