Hope someone can help me. Im trying to make a UISlider with step value from 1 to 5 in Swift
My code are:
@IBAction func yearChange(sender: UISlider) {
let step: Float = 1
let currentValue = round(sender.value / step) * step
print("\(currentValue) year")
}