<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "UIKit",
  "identifier" : "/documentation/UIKit/UIAccelerometer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "UIKit"
    ],
    "preciseIdentifier" : "c:objc(cs)UIAccelerometer"
  },
  "title" : "UIAccelerometer"
}
-->

# UIAccelerometer

An object that lets you register to receive acceleration-related data from the onboard hardware.

```
@interface UIAccelerometer : NSObject
```

## Overview

As a device moves, its hardware reports linear acceleration changes along the primary axes in three-dimensional space. You can use this data to detect both the current orientation of the device (relative to the ground) and any instantaneous changes to that orientation. You might use instantaneous changes as input to a game or to initiate some action in your application.

You don’t create accelerometer objects directly. Instead, you use the shared `UIAccelerometer` object to specify the interval at which you want to receive events and then set its [`delegate`](/documentation/UIKit/UIAccelerometer/delegate) property. Upon assigning your delegate object, the accelerometer object begins delivering acceleration events to your delegate immediately at the specified interval. Events are always delivered on the main thread of your application.

The maximum frequency for accelerometer updates is based on the available hardware. You can request updates less frequently but can’t request them more frequently than the hardware maximum. Once you assign your delegate, however, updates are delivered regularly at the frequency you requested, whether or not the acceleration data actually changed. Your delegate is responsible for filtering out any unwanted updates and for ensuring that the amount of change is significant enough to warrant taking action.

For more information about the data delivered to your observer, see [`UIAcceleration`](/documentation/UIKit/UIAcceleration). For information about implementing your delegate object, see [`UIAccelerometerDelegate`](/documentation/UIKit/UIAccelerometerDelegate).

## Topics

### Getting the shared accelerometer object

[`sharedAccelerometer`](/documentation/UIKit/UIAccelerometer/sharedAccelerometer)

Returns the shared accelerometer object for the system.

### Accessing the accelerometer properties

[`updateInterval`](/documentation/UIKit/UIAccelerometer/updateInterval)

The interval at which to deliver acceleration data to the delegate.

[`delegate`](/documentation/UIKit/UIAccelerometer/delegate)

The delegate object you want to receive acceleration events.



---

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)