Closed naveedmcs closed 5 years ago
this feature has been already added
update slider e.g in viewDidLoad minRange.addTarget(self, action: #selector(minRangeTextFieldChanged), for: .editingChanged) // function Defination @objc func minRangeTextFieldChanged(){
if minRange.text?.count == 0 {
slider.selectedMinValue = 0
slider.setNeedsLayout()
}
guard let minNumber = NumberFormatter().number(from: minRange.text ?? "0") else {return }
guard let maxNumber = NumberFormatter().number(from: maxRange.text ?? "0") else {return }
let minFloat = CGFloat(truncating: minNumber)
let maxFloat = CGFloat(truncating: maxNumber)
if minFloat < maxFloat {
slider.selectedMinValue = minFloat
slider.setNeedsLayout()
}
}
New Issue Checklist
Issue Description
insert min and max value in textField to update range slide, and if slide value is changed textfields should also updated