Search code examples
iphoneipaduislider

UISlider's editingDidEnd event is not working in iPad


I want to trigger one method when sliding the UISlider is ended.I used "editingDidEnd"event of UISlider in xib and attached it to a IBAction method but the method is not being called.Can any one please help me how to know when sliding is ended on UISlider?


Solution

  • UISlider inherits from UIControl so you should be able to add and action on "UIControlEventTouchUpInside"

    Try something like :

    [slider addTarget:self action:@selector(sliderTouchUpInsideAction:) forControlEvents:UIControlEventTouchUpInside];
    

    Hope this helps, Vincent