暂停按钮Swift代码后如何恢复活动

我正在尝试恢复活动并继续从暂停的地方开始计数。

如何从停止的地方重新开始?

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()
  }
iCMS 回答:暂停按钮Swift代码后如何恢复活动

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/2010911.html

大家都在问