Neeraj Pathak
Neeraj Pathak

Reputation: 311

UISlider not flipped on changing the app language to RTL. | iOS

I have to make an app in which one UISlider is there to display distance. This app is supported in RTL language. On changing the app language to RTL app all control flipped accordingly but UISlider is not getting flipped. Is there any special configurations to flip UISlider in iOS

Upvotes: 1

Views: 737

Answers (1)

Neeraj Pathak
Neeraj Pathak

Reputation: 311

UISlider follows same direction in both RTL and LTR mode. So this should not get flipped OS does this for us and prevents flipping UISlider control. If some app has a specific requirement than you can check the application layout mode by

if(UIApplication.sharedApplication().userInterfaceLayoutDirection == UIUserInterfaceLayoutDirection.RightToLeft)
        {
                    uiSlider.transform = CGAffineTransformMakeScale(-1.0, 1.0);
        }

Upvotes: 4

Related Questions