Hi guys,
It's been a long since I used a pretty neat code that slightly animates some shadows to give life to my apps.
As stipulated, it worked fine until the last iOS update. Now, the shadow move half the screen as you can see :-/
Any ideas ? Thanks.
Image link: (remove the extra space)
https ://ibb.co/prMz6Tg
It's been a long since I used a pretty neat code that slightly animates some shadows to give life to my apps.
Code Block func addShadowMotion() { let horizontalEffect = UIInterpolatingMotionEffect( keyPath: "layer.shadowOffset.width", type: .tiltAlongHorizontalAxis) horizontalEffect.minimumRelativeValue = 16 horizontalEffect.maximumRelativeValue = -16 let verticalEffect = UIInterpolatingMotionEffect( keyPath: "layer.shadowOffset.height", type: .tiltAlongVerticalAxis) verticalEffect.minimumRelativeValue = 16 verticalEffect.maximumRelativeValue = -16 let effectGroup = UIMotionEffectGroup() effectGroup.motionEffects = [ horizontalEffect, verticalEffect ] addMotionEffect(effectGroup) }
As stipulated, it worked fine until the last iOS update. Now, the shadow move half the screen as you can see :-/
Any ideas ? Thanks.
Image link: (remove the extra space)
https ://ibb.co/prMz6Tg