Search code examples
objective-cswiftuislider

UISlider is not working in particular language in ios


I'm using UISlider in my app. App localization is there. If the app's language is English UISlider works fine but with other language can't able to increase or decrease value using slider.


Solution

  • UISlider doesn't have any problem with localisation.

    Your code for changing value must be like this and your method mush value valueChanged action.

    Kindly refer below code.

    - (IBAction) sliderValueChanged:(UISlider *)sender
    {  
        myTextField.text = [NSString stringWithFormat:@"%.1f", [sender value]];  
    }