我正在尝试恢复活动并继续从暂停的地方开始计数。
如何从停止的地方重新开始?
private func startRun() {
mapView.delegate = self
//windowPaceDist.isHidden = false
mapView.removeOverlays(mapView.overlays)
seconds = 0
distance = Measurement(value: 0,unit: UnitLength.meters)
locationList.removeAll()
updateDisplay()
timer = Timer.scheduledTimer(withTimeInterval: 1.0,repeats: true) { _ in
self.eachSecond()
}
startLocationUpdates()
}
private func stopRun() {
locationmanager.stopUpdatingLocation()
timer?.invalidate()
}