iOS Guides | Samples

MonoTouch.HealthKit.HKWorkout Class

An HKSample that represents a physical workout.

See Also: HKWorkout

Syntax

[MonoTouch.Foundation.Register("HKWorkout", true)]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.WatchOS, 2, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
[MonoTouch.ObjCRuntime.Introduced(MonoTouch.ObjCRuntime.PlatformName.iOS, 8, 0, MonoTouch.ObjCRuntime.PlatformArchitecture.None, null)]
public class HKWorkout : HKSample

Related content

Requirements

Namespace: MonoTouch.HealthKit
Assembly: monotouch (in monotouch.dll)
Assembly Versions: 0.0.0.0

The members of MonoTouch.HealthKit.HKWorkout are listed below.

See Also: HKSample

Public Constructors

A constructor that initializes the object from the data stored in the unarchiver object.
Constructor to call on derived classes to skip initialization and merely allocate the object.
A constructor used when creating managed representations of unmanaged objects; Called by the runtime.

Public Properties

[read-only]
override
ClassHandleIntPtr. The handle for this class.
[read-only]
DurationDouble. Gets the duration of the workout.
[read-only]
static
SortIdentifierDurationNSString. Represents the value associated with the constant HKWorkoutSortIdentifierDuration
[read-only]
static
SortIdentifierTotalDistanceNSString. Represents the value associated with the constant HKWorkoutSortIdentifierTotalDistance
[read-only]
static
SortIdentifierTotalEnergyBurnedNSString. Represents the value associated with the constant HKWorkoutSortIdentifierTotalEnergyBurned
[read-only]
static
SortIdentifierTotalSwimmingStrokeCountNSString. Represents the value that is associated with the HKWorkoutSortIdentifierTotalSwimmingStrokeCount constant.
[read-only]
TotalDistanceHKQuantity. Gets the total distance of the workout.
[read-only]
TotalEnergyBurnedHKQuantity. Gets the total energy burned by the workout.
[read-only]
TotalSwimmingStrokeCountHKQuantity. Gets the total number of swimming strokes.
[read-only]
WorkoutActivityTypeHKWorkoutActivityType. Gets the activity type of the workout.
[read-only]
WorkoutEventsHKWorkoutEvent[]. Gets an array of workout events that indicate when the user was or was not performing the workout activity.

Public Methods

static
Create(HKWorkoutActivityType, NSDate, NSDate) : HKWorkout
Creates an activity that lasts from startDate to endDate.
static
Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, NSDictionary) : HKWorkout
Creates an activity that lasts from startDate to endDate.
static
Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKMetadata) : HKWorkout
Creates an activity that lasts from startDate to endDate.
static
Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, NSDictionary) : HKWorkout
Creates an activity that lasts from startDate to endDate.
static
Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, HKMetadata) : HKWorkout
Creates an activity that lasts from startDate to endDate.
static
Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKDevice, NSDictionary) : HKWorkout
Creates and returns a new HKWorkout with the provide values.
static
Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKDevice, HKMetadata) : HKWorkout
Creates and returns a new HKWorkout with the provide values.
static
Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, HKDevice, NSDictionary) : HKWorkout
Creates and returns a new HKWorkout with the provide values.
static
Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, HKDevice, HKMetadata) : HKWorkout
Creates and returns a new HKWorkout with the provide values.
static
Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKQuantity, HKDevice, NSDictionary) : HKWorkout
Creates and returns a new HKWorkout with the provide values..
static
Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKQuantity, HKDevice, HKMetadata) : HKWorkout
Creates and returns a new HKWorkout with the provide values.