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

# UIAcceleration

An acceleration event that represents immediate, three-dimensional acceleration data.

```
@interface UIAcceleration : NSObject
```

## Overview

To receive accelerometer events, register an application object as a delegate of the shared [`UIAccelerometer`](/documentation/UIKit/UIAccelerometer) object, as described in [`UIAccelerometer`](/documentation/UIKit/UIAccelerometer).

Each acceleration event includes simultaneous acceleration readings along the three axes of the device, as shown in the following image.

![Orientation of the device axes](images/com.apple.uikit/media-1965794.jpg)

The device accelerometer reports values for each axis in units of g-force, where a value of `1.0` represents acceleration of about +1 g along a given axis. When a device is laying still with its back on a horizontal surface, each acceleration event has approximately the following values:

```objc
x: 0
y: 0
z: -1
```

Individual acceleration values are of type [`UIAccelerationValue`](/documentation/UIKit/UIAccelerationValue), equivalent to a `double`. Values can range over the accelerations found in normal use of a device.

> Note:
> Acceleration event values are approximate—don’t attempt to use them to make precise measurements. Apple recommends that you average accelerometer values over time to derive usable data.

If you want to detect specific types of motion as gestures—specifically, shaking motions—use the [`UIEvent`](/documentation/UIKit/UIEvent) class and its [`UIEvent.EventType.motion`](/documentation/UIKit/UIEvent/EventType/motion) event type. For details, see [Handling Tap and Long-Press Gestures](https://developer.apple.com/library/archive/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/HandlingTapandLongPressGestures.html#//apple_ref/doc/uid/TP40009541-CH4) in [Event Handling Guide for UIKit Apps](https://developer.apple.com/library/archive/documentation/EventHandling/Conceptual/EventHandlingiPhoneOS/index.html#//apple_ref/doc/uid/TP40009541).

## Topics

### Accessing the acceleration values

[`x`](/documentation/UIKit/UIAcceleration/x)

The acceleration value for the x axis of the device.

[`y`](/documentation/UIKit/UIAcceleration/y)

The acceleration value for the y axis of the device.

[`z`](/documentation/UIKit/UIAcceleration/z)

The acceleration value for the z axis of the device.

[`timestamp`](/documentation/UIKit/UIAcceleration/timestamp)

The relative time at which the acceleration event occurred.

### Constants

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

The amount of acceleration in a single linear direction.



---

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)