---
title: CMGyroHandler
framework: coremotion
role: symbol
role_heading: Type Alias
path: coremotion/cmgyrohandler
---

# CMGyroHandler

The type of block callback for handling gyroscope data.

## Declaration

```swift
typealias CMGyroHandler = (CMGyroData?, (any Error)?) -> Void
```

## Discussion

Discussion Blocks of type CMGyroHandler are called when there is gyroscope data to process. You pass the block into startGyroUpdates(to:withHandler:) as the second argument. Blocks of this type return no value but take two arguments:

## See Also

### Managing Gyroscope Updates

- [gyroUpdateInterval](coremotion/cmmotionmanager/gyroupdateinterval.md)
- [startGyroUpdates(to:withHandler:)](coremotion/cmmotionmanager/startgyroupdates(to:withhandler:).md)
- [startGyroUpdates()](coremotion/cmmotionmanager/startgyroupdates().md)
- [stopGyroUpdates()](coremotion/cmmotionmanager/stopgyroupdates().md)
- [gyroData](coremotion/cmmotionmanager/gyrodata.md)
