Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Using Accelerometer in iOS Applications
public override void ViewDidLoad()
_motionManager = new CMMotionManager();
_motionManager.StartAccelerometerUpdates(NSOperationQueue.CurrentQueue, (data, error) =>
lblXAxis.Text = data.Acceleration.X.ToString("F");
lblYAxis.Text = data.Acceleration.Y.ToString("F");
lblZAxis.Text = data.Acceleration.Z.ToString("F");
// Perform any additional setup after loading the view, typically from a nib.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment