I am using the UIAccelerotmeterDelegate method accelerometer:didAccelerate: but recently that method has been deprecated in iOS 5.0. So what is the alternative way
UIAccelerotmeterDelegate
It seems that UIAccelerometer and UIAccelerometerDelegate were replaced by the CoreMotion framework.
You can find the answer here:
Why is accelerometer:didAccelerate: deprecated in IOS5?
I Hope it helps.