Edit

Share via


HKQuantity.IsCompatible(HKUnit) Method

Definition

Checks if the specified unit is compatible with this quantity.

[Foundation.Export("isCompatibleWithUnit:")]
public virtual bool IsCompatible (HealthKit.HKUnit unit);
abstract member IsCompatible : HealthKit.HKUnit -> bool
override this.IsCompatible : HealthKit.HKUnit -> bool

Parameters

unit
HKUnit

Returns

Attributes

Remarks

Units are compatible when they represent the same quantity, even if they are using different units.  This function would return true for example if the quantity was in meters, and the specified unit was in feet as they are convertible to each other.

Applies to