averageQuantity()
Returns the average value from all the samples that match the query.
Declaration
func averageQuantity() -> HKQuantity?Return Value
If the discreteAverage option was set, this method returns a quantity object containing the average value of all samples matching the query; otherwise, it returns nil.