I've replaced some UISliders with your GradientSlider, and noticed that (unlike UISlider), when setting an action/target pair for UIControlEventValueChanged of the form:
- (void)action:(id)sender forEvent:(UIEvent *)event the received event is always nil.
I believe this is due to the calls to sendActions losing the associated UIEvent info, and successfully implemented a fix by replacing them with loops of sendAction calls.
Also - not sure, but I believe the call to sendActions in beginTracking should include valueChanged in its controlEvents to match UISlider behavior.
Let me know if this is at all something you wish to change, I could submit a small PR (tho my swift is weak)
Hi,
Great little library, thanks for your work!
I've replaced some UISliders with your GradientSlider, and noticed that (unlike UISlider), when setting an action/target pair for
UIControlEventValueChanged
of the form:- (void)action:(id)sender forEvent:(UIEvent *)event
the receivedevent
is alwaysnil
.I believe this is due to the calls to
sendActions
losing the associatedUIEvent
info, and successfully implemented a fix by replacing them with loops ofsendAction
calls.Also - not sure, but I believe the call to
sendActions
inbeginTracking
should includevalueChanged
in its controlEvents to match UISlider behavior.Let me know if this is at all something you wish to change, I could submit a small PR (tho my swift is weak)
Thanks!