Instance Method

accelerometer:didAccelerate:

Delivers the latest acceleration data to the delegate.

Declaration

- (void)accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)acceleration;

Parameters

accelerometer

The application-wide accelerometer object.

acceleration

The most recent acceleration data.

Discussion

The shared UIAccelerometer object invokes this method at the desired interval, providing your delegate with updated acceleration data each time.

This method is always invoked on your application’s main thread when it is in the NSDefaultRunLoopMode run loop mode.