Skip to content

UIEvent is nil in valueChanged callback #11

@yonilevy

Description

@yonilevy

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 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)

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions