I'm trying to change my UIView's frame with value I get from CMMotionManager and its method - startDeviceMotionUpdatesToQueue:withHandler
I wrote a draft like this :
[_motionManager startDeviceMotionUpdatesToQueue:theQueue withHandler:^(CMDeviceMotion *motion, NSError *error) {
CGRect frame = _backgroundView.frame;
double x = motion.attitude.roll;
frame.origin.x = x*10;
[_backgroundView setFrame:frame];
}];
But my view doesn't move at all. If I log my frame I can see changes at every update ... So why my view isn't moving on screen ?