iOS倒计时器重置按钮(Swift)

时间:2017-04-02 16:36:54

标签: ios swift xcode

我正在实施一个倒数计时器,我遇到了重置按钮的问题。我收到了错误"类型的值'(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")
}

0 个答案:

没有答案