Does a method get called when a UISlider
's value
changes? I want to be able to update a value based on the UISliders
value, but only when it changes...
Thanks for any help.
Does a method get called when a UISlider
's value
changes? I want to be able to update a value based on the UISliders
value, but only when it changes...
Thanks for any help.
For Swift 3
In IB, you can hook up an
IBAction
to theValue Changed event
or in code add target/action forUIControlEventValueChanged
. For example:Note that if you want the value change events as the user is
sliding
, then be sure that theslider
'scontinuous property
is also set. On the other hand, if you don't want the event to fire as the user issliding
and only when they finish sliding, set continuous to NO (or uncheck in IB).