/// Destroy current timer
private func destroyTimer() {
self.timer?.setEventHandler(handler: nil)
self.timer?.cancel()
if state == .paused || state == .finished {
self.timer?.resume()
}
}
This method when the order is written is wrong, the timer if is put up, is to call self. The timer?resume (), and then call the self. The timer?.cancel () in the self. The timer = nil to release,Or it will collapse
/// Destroy current timer
private func destroyTimer() {
self.timer?.setEventHandler(handler: nil)
self.timer?.cancel()
This method when the order is written is wrong, the timer if is put up, is to call self. The timer?resume (), and then call the self. The timer?.cancel () in the self. The timer = nil to release,Or it will collapse