标签: swift viewcontroller stopwatch
如何在swift中重置秒表?这是我的代码
@IBAction func resetButton(sender: UIButton) { self.viewDidLoad() self.viewWillAppear(Bool) } @IBAction func stopButton(sender: UIButton) { print(stopwatch.elapsedTime) stopwatch.stop() }