我正在实施一个倒数计时器,我遇到了重置按钮的问题。我收到了错误"类型的值'(UISlider) - > ()'没有会员' setValue'
@IBAction func sessionSlider(_ sender: UISlider) {
seconds = Int(sender.value)
sessionCountdownLabel.text = String("\(seconds) Seconds")
}
@IBAction func resetButton(_ sender: Any) {
timer.invalidate()
seconds = 30
sessionSlider.setValue(30, animated: true)
sessionCountdownLabel.text = String("\(seconds) Seconds")
}