Neeraj Pathak Neeraj Pathak - 9 months ago 63
iOS Question

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


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