TomThorpe / TTRangeSlider

A slider, similar in style to UISlider, but which allows you to pick a minimum and maximum range.
MIT License
968 stars 204 forks source link

Localization issue (RTL) #95

Open lotfyahmed opened 5 years ago

lotfyahmed commented 5 years ago

Did you supported RTL direction?

In arabic language (right direction), we faced that min value should be in left position and max should be in the right?

Thanks

basmaamahmoud commented 5 years ago

did you find a solution??

Afrah-Tayyab commented 3 years ago

Make an Outlet for Range Slider. after that make an uiView extension in that make a function that rotate the view. i.e @IBOutlet weak var rangeSlide: TTRangeSlider!

//Now creating rotate function that rotate the slider view

func rotate(degrees: CGFloat) {
        let degreesToRadians: (CGFloat) -> CGFloat = { (degrees: CGFloat) in
            return degrees / 180.0 * CGFloat.pi
        }
        self.transform =  CGAffineTransform(rotationAngle: degreesToRadians(degrees))

    }
if language is arabic{

Now call this function like rangeSlider.rotate(180). 
}else{
Now call this function like rangeSlider.rotate(0). }

Enjoy Hope it works for you.