Device motion detection in iOS
问题 I want to detect the device motion like Panorama i.e. motion from my left side to Right side . I tried with the accelerometer but i can't able to do it. I like to move one image in a straight line as the device move. My code is as follow: - (void)viewDidLoad { [super viewDidLoad]; [[UIAccelerometer sharedAccelerometer] setUpdateInterval:1/60]; [[UIAccelerometer sharedAccelerometer]setDelegate:self]; } pragma mark - Accelerometer Delegate - (void)accelerometer:(UIAccelerometer *)accelerometer