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
This is what I did and it seemed to have worked:
// For the slider
@IBOutlet weak var slider: UISlider!
// For the label displaying the slider value
@IBOutlet weak var sliderVal: UILabel!
// For the "submit" button action
@IBAction func newSliderValue(_ sender: Any) {
sliderVal.text = String(slider.value)
}
Note, I used a button to submit my new slider value, not what you did.