如何在swift中重置viewcontroller

时间:2016-02-01 12:22:07

标签: swift viewcontroller stopwatch

如何在swift中重置秒表?这是我的代码

@IBAction func resetButton(sender: UIButton) {
    self.viewDidLoad()
    self.viewWillAppear(Bool)
}
@IBAction func stopButton(sender: UIButton) {
    print(stopwatch.elapsedTime)
    stopwatch.stop()
}

0 个答案:

没有答案