In HypnosisViewController.m, add the following implementation of the UIAccelerometer delegate method, accelerometer:didAccelerate:. This method will log accelerometer updates to the console. Notice that the types of the two parameters are different even though they look similar:
- (void)accelerometer:(UIAccelerometer *)meter didAccelerate:(UIAcceleration *)accel { NSLog(@"%f, %f, %f", [accel x], [accel y], [accel z]); }
Build and run the application on your device. Watch the console as you rotate and shake the phone to get a feel for the data that the accelerometer produces.
3.139.97.53