CoreMotion.CMAccelerometerHandler Delegate
A delegate signature used to receive events from CoreMotion.CMMotionManager

Syntax

public delegate void CMAccelerometerHandler (CMAccelerometerData data, Foundation.NSError error)

Parameters

data
The accelerometer data for this event.
error
An error, or null if there have been no errors.

Remarks

This signature is used as an argument to the CoreMotion.CMMotionManager's StartAccelerometerUpdates.

C# Example

     var motionManager = new CMMotionManager ();
     motionManager.AccelerometerUpdateInterval = 0.01; // 100Hz
     motionManager.StartAccelerometerUpdates (NSOperationQueue.CurrentQueue, (data, error) => {
          Console.WriteLine ("Got an acceleration event {0}", data.Acceleration.X);
     });
  

Requirements

Namespace: CoreMotion
Assembly: Xamarin.iOS (in Xamarin.iOS.dll)
Assembly Versions: 0.0.0.0