adjusting label to slider value swift

后端 未结 6 1552
南旧
南旧 2021-01-01 14:44

I have a slider and label in my swift project. On the storyboard, I control dragged my slider onto my controller class for that page and created an outlet and also an action

6条回答
  •  醉梦人生
    2021-01-01 15:09

    try this

    var currentValue = Int(slider.value)
    println("Slider changing to \(currentValue) ?")
    startTime.text = "\(currentValue) Km"
    

提交回复
热议问题