Contents

workout(_:)

Returns a sample predicate that matches workout samples.

Declaration

static func workout(_ predicate: NSPredicate? = nil) -> HKSamplePredicate<HKWorkout>

Parameters

  • predicate:

    An optional predicate that further restricts the results that the query returns.

Discussion

Use this method to create an HKSamplePredicate instance that you can use to query for HKWorkout objects.

See Also

Creating Sample Predicates