共用方式為


HKWorkoutEvent.Create 方法

定義

多載

Create(HKWorkoutEventType, NSDate)

開發人員不應該使用此已被取代的方法。 開發人員應該改用 'Create (HKWorkoutEventType、NSDateInterval、HKMetadata) '。

Create(HKWorkoutEventType, NSDate, NSDictionary)
Create(HKWorkoutEventType, NSDate, HKMetadata)
Create(HKWorkoutEventType, NSDateInterval, NSDictionary)
Create(HKWorkoutEventType, NSDateInterval, HKMetadata)

Create(HKWorkoutEventType, NSDate)

開發人員不應該使用此已被取代的方法。 開發人員應該改用 'Create (HKWorkoutEventType、NSDateInterval、HKMetadata) '。

[Foundation.Export("workoutEventWithType:date:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")]
public static HealthKit.HKWorkoutEvent Create (HealthKit.HKWorkoutEventType type, Foundation.NSDate date);
static member Create : HealthKit.HKWorkoutEventType * Foundation.NSDate -> HealthKit.HKWorkoutEvent

參數

date
NSDate

傳回

屬性

適用於

Create(HKWorkoutEventType, NSDate, NSDictionary)

[Foundation.Export("workoutEventWithType:date:metadata:")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")]
[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.HKWorkoutEvent Create (HealthKit.HKWorkoutEventType type, Foundation.NSDate date, Foundation.NSDictionary metadata);
static member Create : HealthKit.HKWorkoutEventType * Foundation.NSDate * Foundation.NSDictionary -> HealthKit.HKWorkoutEvent

參數

date
NSDate
metadata
NSDictionary

傳回

屬性

適用於

Create(HKWorkoutEventType, NSDate, HKMetadata)

[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")]
[ObjCRuntime.Deprecated(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.None, "Use 'Create (HKWorkoutEventType, NSDateInterval, HKMetadata)' instead.")]
[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.HKWorkoutEvent Create (HealthKit.HKWorkoutEventType type, Foundation.NSDate date, HealthKit.HKMetadata metadata);
static member Create : HealthKit.HKWorkoutEventType * Foundation.NSDate * HealthKit.HKMetadata -> HealthKit.HKWorkoutEvent

參數

date
NSDate
metadata
HKMetadata

傳回

屬性

適用於

Create(HKWorkoutEventType, NSDateInterval, NSDictionary)

[Foundation.Export("workoutEventWithType:dateInterval:metadata:")]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static HealthKit.HKWorkoutEvent Create (HealthKit.HKWorkoutEventType type, Foundation.NSDateInterval dateInterval, Foundation.NSDictionary metadata);
static member Create : HealthKit.HKWorkoutEventType * Foundation.NSDateInterval * Foundation.NSDictionary -> HealthKit.HKWorkoutEvent

參數

dateInterval
NSDateInterval
metadata
NSDictionary

即將加入。

這個參數可以是 null

傳回

屬性

適用於

Create(HKWorkoutEventType, NSDateInterval, HKMetadata)

[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.WatchOS, 4, 0, ObjCRuntime.PlatformArchitecture.All, null)]
[ObjCRuntime.Introduced(ObjCRuntime.PlatformName.iOS, 11, 0, ObjCRuntime.PlatformArchitecture.All, null)]
public static HealthKit.HKWorkoutEvent Create (HealthKit.HKWorkoutEventType type, Foundation.NSDateInterval dateInterval, HealthKit.HKMetadata metadata);
static member Create : HealthKit.HKWorkoutEventType * Foundation.NSDateInterval * HealthKit.HKMetadata -> HealthKit.HKWorkoutEvent

參數

dateInterval
NSDateInterval
metadata
HKMetadata

傳回

屬性

適用於