views:

20

answers:

0

Hi everyone .. iam trying to turn a view in x or y Axis via CLLocationManager ! is it possible ?

my application run on iPad so there is no gyroscope , if use this code :

- (void)locationManager:(CLLocationManager *)manager didUpdateHeading:(CLHeading *)newHeading {
CGFloat heading = -1.0f * M_PI * newHeading.magneticHeading / 180.0f;
myView.transform = CGAffineTransformMakeRotation(heading);

}

my view rotates 180 degree ! and i tried CGPoing but didn't work thank you