共用方式為


HKWorkout.Create 方法

定義

多載

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKQuantity, HKDevice, NSDictionary)

使用 provide 值建立並傳回新的 HKWorkout

Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, HKDevice, HKMetadata)

使用提供值建立並傳回新的 HKWorkout

Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, HKDevice, NSDictionary)

使用提供值建立並傳回新的 HKWorkout

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKDevice, HKMetadata)

使用提供值建立並傳回新的 HKWorkout

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKDevice, NSDictionary)

使用提供值建立並傳回新的 HKWorkout

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKQuantity, HKDevice, HKMetadata)

使用提供值建立並傳回新的 HKWorkout

Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, NSDictionary)

建立一個活動,該活動會從 startDate 持續到 endDate

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKMetadata)

建立一個活動,該活動會從 startDate 持續到 endDate

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, NSDictionary)

建立一個活動,該活動會從 startDate 持續到 endDate

Create(HKWorkoutActivityType, NSDate, NSDate)

建立一個活動,該活動會從 startDate 持續到 endDate

Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, HKMetadata)

建立一個活動,該活動會從 startDate 持續到 endDate

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKQuantity, HKDevice, NSDictionary)

使用 provide 值建立並傳回新的 HKWorkout

[Foundation.Export("workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:totalSwimmingStrokeCount:device:metadata:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 3, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, HealthKit.HKWorkoutEvent[] workoutEvents, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, HealthKit.HKQuantity totalSwimmingStrokeCount, HealthKit.HKDevice device, Foundation.NSDictionary metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * HealthKit.HKWorkoutEvent[] * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKDevice * Foundation.NSDictionary -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
workoutEvents
HKWorkoutEvent[]

即將加入。

這個參數可以是 null

totalEnergyBurned
HKQuantity

即將加入。

這個參數可以是 null

totalDistance
HKQuantity

即將加入。

這個參數可以是 null

totalSwimmingStrokeCount
HKQuantity

即將加入。

這個參數可以是 null

device
HKDevice

即將加入。

這個參數可以是 null

metadata
NSDictionary

即將加入。

這個參數可以是 null

傳回

屬性

適用於

Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, HKDevice, HKMetadata)

使用提供值建立並傳回新的 HKWorkout

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, double duration, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, HealthKit.HKDevice device, HealthKit.HKMetadata metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * double * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKDevice * HealthKit.HKMetadata -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
duration
Double
totalEnergyBurned
HKQuantity
totalDistance
HKQuantity
device
HKDevice
metadata
HKMetadata

傳回

屬性

適用於

Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, HKDevice, NSDictionary)

使用提供值建立並傳回新的 HKWorkout

[Foundation.Export("workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:device:metadata:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, double duration, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, HealthKit.HKDevice device, Foundation.NSDictionary metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * double * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKDevice * Foundation.NSDictionary -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
duration
Double
totalEnergyBurned
HKQuantity

即將加入。

這個參數可以是 null

totalDistance
HKQuantity

即將加入。

這個參數可以是 null

device
HKDevice

即將加入。

這個參數可以是 null

metadata
NSDictionary

即將加入。

這個參數可以是 null

傳回

屬性

適用於

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKDevice, HKMetadata)

使用提供值建立並傳回新的 HKWorkout

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, HealthKit.HKWorkoutEvent[] workoutEvents, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, HealthKit.HKDevice device, HealthKit.HKMetadata metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * HealthKit.HKWorkoutEvent[] * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKDevice * HealthKit.HKMetadata -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
workoutEvents
HKWorkoutEvent[]
totalEnergyBurned
HKQuantity
totalDistance
HKQuantity
device
HKDevice
metadata
HKMetadata

傳回

屬性

適用於

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKDevice, NSDictionary)

使用提供值建立並傳回新的 HKWorkout

[Foundation.Export("workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:device:metadata:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 9, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, HealthKit.HKWorkoutEvent[] workoutEvents, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, HealthKit.HKDevice device, Foundation.NSDictionary metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * HealthKit.HKWorkoutEvent[] * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKDevice * Foundation.NSDictionary -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
workoutEvents
HKWorkoutEvent[]

即將加入。

這個參數可以是 null

totalEnergyBurned
HKQuantity

即將加入。

這個參數可以是 null

totalDistance
HKQuantity

即將加入。

這個參數可以是 null

device
HKDevice

即將加入。

這個參數可以是 null

metadata
NSDictionary

即將加入。

這個參數可以是 null

傳回

屬性

適用於

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKQuantity, HKDevice, HKMetadata)

使用提供值建立並傳回新的 HKWorkout

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 3, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 10, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, HealthKit.HKWorkoutEvent[] workoutEvents, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, HealthKit.HKQuantity totalSwimmingStrokeCount, HealthKit.HKDevice device, HealthKit.HKMetadata metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * HealthKit.HKWorkoutEvent[] * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKDevice * HealthKit.HKMetadata -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
workoutEvents
HKWorkoutEvent[]
totalEnergyBurned
HKQuantity
totalDistance
HKQuantity
totalSwimmingStrokeCount
HKQuantity
device
HKDevice
metadata
HKMetadata

傳回

屬性

適用於

Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, NSDictionary)

建立一個活動,該活動會從 startDate 持續到 endDate

[Foundation.Export("workoutWithActivityType:startDate:endDate:duration:totalEnergyBurned:totalDistance:metadata:")]
public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, double duration, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, Foundation.NSDictionary metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * double * HealthKit.HKQuantity * HealthKit.HKQuantity * Foundation.NSDictionary -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
duration
Double
totalEnergyBurned
HKQuantity

即將加入。

這個參數可以是 null

totalDistance
HKQuantity

即將加入。

這個參數可以是 null

metadata
NSDictionary

即將加入。

這個參數可以是 null

傳回

屬性

適用於

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, HKMetadata)

建立一個活動,該活動會從 startDate 持續到 endDate

public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, HealthKit.HKWorkoutEvent[] workoutEvents, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, HealthKit.HKMetadata metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * HealthKit.HKWorkoutEvent[] * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKMetadata -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
workoutEvents
HKWorkoutEvent[]
totalEnergyBurned
HKQuantity
totalDistance
HKQuantity
metadata
HKMetadata

傳回

適用於

Create(HKWorkoutActivityType, NSDate, NSDate, HKWorkoutEvent[], HKQuantity, HKQuantity, NSDictionary)

建立一個活動,該活動會從 startDate 持續到 endDate

[Foundation.Export("workoutWithActivityType:startDate:endDate:workoutEvents:totalEnergyBurned:totalDistance:metadata:")]
public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, HealthKit.HKWorkoutEvent[] workoutEvents, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, Foundation.NSDictionary metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * HealthKit.HKWorkoutEvent[] * HealthKit.HKQuantity * HealthKit.HKQuantity * Foundation.NSDictionary -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
workoutEvents
HKWorkoutEvent[]

即將加入。

這個參數可以是 null

totalEnergyBurned
HKQuantity

即將加入。

這個參數可以是 null

totalDistance
HKQuantity

即將加入。

這個參數可以是 null

metadata
NSDictionary

即將加入。

這個參數可以是 null

傳回

屬性

適用於

Create(HKWorkoutActivityType, NSDate, NSDate)

建立一個活動,該活動會從 startDate 持續到 endDate

[Foundation.Export("workoutWithActivityType:startDate:endDate:")]
public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate

傳回

屬性

適用於

Create(HKWorkoutActivityType, NSDate, NSDate, Double, HKQuantity, HKQuantity, HKMetadata)

建立一個活動,該活動會從 startDate 持續到 endDate

public static HealthKit.HKWorkout Create (HealthKit.HKWorkoutActivityType workoutActivityType, Foundation.NSDate startDate, Foundation.NSDate endDate, double duration, HealthKit.HKQuantity totalEnergyBurned, HealthKit.HKQuantity totalDistance, HealthKit.HKMetadata metadata);
static member Create : HealthKit.HKWorkoutActivityType * Foundation.NSDate * Foundation.NSDate * double * HealthKit.HKQuantity * HealthKit.HKQuantity * HealthKit.HKMetadata -> HealthKit.HKWorkout

參數

workoutActivityType
HKWorkoutActivityType
startDate
NSDate
endDate
NSDate
duration
Double
totalEnergyBurned
HKQuantity
totalDistance
HKQuantity
metadata
HKMetadata

傳回

適用於