在将应用程序语言更改为RTL时,UISlider没有翻转.|的iOS [英] UISlider not flipped on changing the app language to RTL. | iOS

查看:46
本文介绍了在将应用程序语言更改为RTL时,UISlider没有翻转.|的iOS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我必须制作一个其中有一个UISlider的应用程序以显示距离.该应用程序支持RTL语言.将应用程序语言更改为RTL应用程序时,所有控件均被相应翻转,但UISlider未被翻转.是否有任何特殊配置可在iOS中翻转UISlider

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在RTL和LTR模式下都遵循相同的方向.因此,不应翻转操作系统为我们执行此操作,并防止翻转UISlider控件.如果某些应用程序有特定要求,则可以通过

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

这篇关于在将应用程序语言更改为RTL时,UISlider没有翻转.|的iOS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆