I have one class name as myClassCalculate have the following method
- (void) accelerometer:(UIAccelerometer *)accelerometer didAccelerate:(UIAcceleration *)accel
When app goes in backgroound this method is called onUserLeaveHint()
onUserLeaveHint()