<!--
{
  "availability" : [
    "iOS: 9.3.0 -",
    "iPadOS: 9.3.0 -",
    "macCatalyst: 13.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "HealthKit",
  "identifier" : "/documentation/HealthKitUI/HKActivityRingView",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "HealthKitUI"
    ],
    "preciseIdentifier" : "c:objc(cs)HKActivityRingView"
  },
  "title" : "HKActivityRingView"
}
-->

# HKActivityRingView

A view that uses the Move, Exercise, and Stand activity rings to display data from a HealthKit activity summary object.

```
class HKActivityRingView
```

## Overview

Use [`HKActivityRingView`](/documentation/HealthKitUI/HKActivityRingView) to display data from an [`HKActivitySummary`](/documentation/HealthKit/HKActivitySummary) object. For example, the following image shows how the rings can display a summary view of a person’s activity.

![Two partially filled and one completely filled colored concentric rings on a black background.](images/com.apple.healthkit/media-1965751@2x.png)

To display activity summary data from the HealthKit store, use an [`HKActivitySummaryQuery`](/documentation/HealthKit/HKActivitySummaryQuery) object. You can also instantiate and display your own [`HKActivitySummary`](/documentation/HealthKit/HKActivitySummary) objects, as needed.

The activity ring view always appears as a black rectangle with colored concentric rings. The rings are centered in the view and are sized to fit the available space.

![Two partially filled and one completely filled colored concentric rings centered on a black rectangle background.](images/com.apple.healthkit/media-1965753@2x.png)

The activity ring view displays different rings depending on the properties defined in the ring view’s [`HKActivitySummary`](/documentation/HealthKit/HKActivitySummary) property. When the view’s [`HKActivitySummary`](/documentation/HealthKit/HKActivitySummary) has [`activityMoveMode`](/documentation/HealthKit/HKActivityMoveModeObject/activityMoveMode) set to [`appleMoveTime`](/documentation/HealthKit/HKActivitySummary/appleMoveTime) and `nil` values for [`appleExerciseTimeGoal`](/documentation/HealthKit/HKActivitySummary/appleExerciseTimeGoal) and [`appleStandHoursGoal`](/documentation/HealthKit/HKActivitySummary/appleStandHoursGoal) the ring only displays the red Move ring. Otherwise, it displays the Move, Exercise, and Stand activity as red, green, and blue concentric rings. Summary data from the HealthKit store only displays the Move ring when the person hasn’t paired an Apple Watch.

The rings can display as either empty or with a dot at the top of the ring to display a lack of data. Empty rings indicate that the activity summary is missing, and a dot at the top indicates that the activity summary’s values are set to zero.

If the ring has a `nil`-valued `activitySummary` quantity properties, the rings appear empty. Use this to indicate that there is no summary data available for the specified day. For example, dates in the future.

![Three dimly colored concentric rings.](images/com.apple.healthkit/media-2556410@2x.png)

If the summary has zero-valued quantities set for its value properties, the ring displays a dot at the top of the ring. Use this to indicate that the person hasn’t burned any active calories, exercised, or earned any stand hours for the specified day.

![Three dimly colored concentric rings with a bright dot at the top of each ring.](images/com.apple.healthkit/media-2556419@2x.png)

To display data for a ring, the [`HKActivitySummary`](/documentation/HealthKit/HKActivitySummary) object must have a non-`nil` quantity for both the corresponding value property and the goal property.

|Ring    |Value property                                                                            |Goal property                                                                                 |
|--------|------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|
|Move    |``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/activeEnergyBurned``|``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/activeEnergyBurnedGoal``|
|Exercise|``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/appleExerciseTime`` |``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/appleExerciseTimeGoal`` |
|Stand   |``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/appleStandHours``   |``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/appleStandHoursGoal``   |

Move only ring properties:

|Ring|Value property                                                                                                                                                                    |Goal property                                                                                                                                                                             |
|----|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|Move|``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/appleMoveTime`` | ``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/activeEnergyBurned``|``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/appleMoveTimeGoal`` | ``doc://com.apple.healthkit/documentation/HealthKit/HKActivitySummary/activeEnergyBurnedGoal``|

The activity ring view colors a percentage of each ring based on these properties, as shown here:

```objc
ring percent = value property quantity / goal property quantity
```

![One partially filled colored concentric ring on a black background.](images/com.apple.healthkit/single-ring@2x.png)

The following code snippet shows how to manually display only the Move ring:

```swift
let moveOnlySummary = HKActivitySummary()
moveOnlySummary.activityMoveMode = .appleMoveTime
moveOnlySummary.appleMoveTime = HKQuantity(unit: .minute(), doubleValue: 60.0)
moveOnlySummary.appleMoveTimeGoal = HKQuantity(unit: .minute(), doubleValue: 90.0)
```

## Topics

### Setting the activity summary

[`activitySummary`](/documentation/HealthKitUI/HKActivityRingView/activitySummary)

The active summary displayed by the activity ring view.

[`-  setActivitySummary:animated:`](/documentation/HealthKitUI/HKActivityRingView/setActivitySummary(_:animated:))

Sets the activity summary displayed by the activity ring view.

## Relationships

### Conforms To

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`CVarArg`](/documentation/Swift/CVarArg)

[`UIAppearanceContainer`](/documentation/UIKit/UIAppearanceContainer)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`UIFocusItemContainer`](/documentation/UIKit/UIFocusItemContainer)

[`Hashable`](/documentation/Swift/Hashable)

[`Equatable`](/documentation/Swift/Equatable)

[`NSTouchBarProvider`](/documentation/AppKit/NSTouchBarProvider)

[`UIUserActivityRestoring`](/documentation/UIKit/UIUserActivityRestoring)

[`UIResponderStandardEditActions`](/documentation/UIKit/UIResponderStandardEditActions)

[`UITraitEnvironment`](/documentation/UIKit/UITraitEnvironment)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`CLBodyIdentifiable`](/documentation/CoreLocation/CLBodyIdentifiable)

[`UIFocusItem`](/documentation/UIKit/UIFocusItem)

[`UIPasteConfigurationSupporting`](/documentation/UIKit/UIPasteConfigurationSupporting)

[`UIFocusEnvironment`](/documentation/UIKit/UIFocusEnvironment)

[`UIPopoverPresentationControllerSourceItem`](/documentation/UIKit/UIPopoverPresentationControllerSourceItem)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`UIAppearance`](/documentation/UIKit/UIAppearance)

[`UIAccessibilityIdentification`](/documentation/UIKit/UIAccessibilityIdentification)

[`UILargeContentViewerItem`](/documentation/UIKit/UILargeContentViewerItem)

[`UIDynamicItem`](/documentation/UIKit/UIDynamicItem)

[`UICoordinateSpace`](/documentation/UIKit/UICoordinateSpace)

[`UITraitChangeObservable-67e94`](/documentation/UIKit/UITraitChangeObservable-67e94)

[`CMBodyIdentifiable`](/documentation/CoreMotion/CMBodyIdentifiable)

[`CALayerDelegate`](/documentation/QuartzCore/CALayerDelegate)

[`UIActivityItemsConfigurationProviding`](/documentation/UIKit/UIActivityItemsConfigurationProviding)

### Inherits From

[`UIView`](/documentation/UIKit/UIView)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)