stop(_:)
Stops a long-running query.
Declaration
func stop(_ query: HKQuery)Parameters
- query:
Either an Hkobserverquery instance or an Hkstatisticscollectionquery instance.
Mentioned in
Discussion
Use this method on long-running queries only. Most queries automatically stop after they have gathered the requested data. Long-running queries continue to operate on a background thread, watching the HealthKit store for updates. You can cancel these queries by using this method.