CMAccelerometerHandler Delegate
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
A delegate signature used to receive events from CMMotionManager
public delegate void CMAccelerometerHandler(CMAccelerometerData data, NSError error);
type CMAccelerometerHandler = delegate of CMAccelerometerData * NSError -> unit
Parameters
- data
- CMAccelerometerData
The accelerometer data for this event.
- error
- NSError
An error, or null if there have been no errors.
Remarks
This signature is used as an argument to the CMMotionManager's StartAccelerometerUpdates.
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);
});