I am trying to create a parallax effect such as the iPhone homescreen where the background moves as your tilt your phone. I have so far achieved this, but I have one problem still. After I tilt my phone and the background moves, it very slowly moves back into position of being centered.

It's not the constraints. I removed the center x/y constraint and it still slid back slowly as if it was re-calibrating to the new position. The only other constraint is the ratio. So it's not the constraints.

any ideas?

The code is simple:

let leftRightMin = CGFloat(-50.0) let leftRightMax = CGFloat(50.0) let upDownMin = CGFloat(-35.0) let upDownMax = CGFloat(35.0) let leftRight = UIInterpolatingMotionEffect(keyPath: "center.x", type: UIInterpolatingMotionEffectType.TiltAlongHorizontalAxis) leftRight.minimumRelativeValue = leftRightMin leftRight.maximumRelativeValue = leftRightMax let upDown = UIInterpolatingMotionEffect(keyPath: "center.y", type: UIInterpolatingMotionEffectType.TiltAlongVerticalAxis) upDown.minimumRelativeValue = upDownMin upDown.maximumRelativeValue = upDownMax let fxGroup = UIMotionEffectGroup() fxGroup.motionEffects = [leftRight, upDown] backgroundImage.addMotionEffect(fxGroup)

Any ideas why it slowly centers the image back after tilting and how to fix it?