Measuring tilt angle with CMMotionManager

Look at gravity: self.deviceQueue = [[NSOperationQueue alloc] init]; self.motionManager = [[CMMotionManager alloc] init]; self.motionManager.deviceMotionUpdateInterval = 5.0 / 60.0; // UIDevice *device = [UIDevice currentDevice]; [self.motionManager startDeviceMotionUpdatesUsingReferenceFrame:CMAttitudeReferenceFrameXArbitraryZVertical toQueue:self.deviceQueue withHandler:^(CMDeviceMotion *motion, NSError *error) { [[NSOperationQueue mainQueue] addOperationWithBlock:^{ CGFloat x = motion.gravity.x; CGFloat y = motion.gravity.y; CGFloat z = motion.gravity.z; }]; }]; With this reference frame (CMAttitudeReferenceFrameXArbitraryZVertical), if … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)