iPhone smooth transition using UIAccelerometer

In my previous post, I have explained how to enable the accelerometer usage in your application.

By using this post, I am going to demonstrate, how to make smooth transition using UIAccelerometer in your application.

Just go through following changes that I have done.

Change 1) Accelerometer is updated 10 times in a second. Previously it was set to 50.

Change 2) I have added filtering factor, which will neglect minor device movements/jerks/tilts. I also have added view animation here. So, while rotating it will use UIView animation.

Change 3) No orientation. I have removed orientation. So, while shaking your device, it won’t rotate to any other orientation.

You can download the project from here.

Leave a Reply

Your email address will not be published. Required fields are marked *