Post

Replies

Boosts

Views

Activity

Reply to UIMotionEffect Not Working in iOS 14?
I filed FB8369431 for this bug too. I noticed that the problem is that the motion effect can't be added to the view. Immediately after adding it you can see that view.motionEffects is still empty. I haven't had time to do this, but it might help to use Hopper Dissasembler to look at the addMotionEffect implementation. Maybe there is a permission check we are failing, such as a new undocumented requirement to access the accelerometer data? Here is the very easy repro: let effect = UIInterpolatingMotionEffect(keyPath: "center.x",type: .tiltAlongHorizontalAxis) effect.minimumRelativeValue = -10 effect.maximumRelativeValue = 10 blueView.addMotionEffect(effect) if blueView.motionEffects.count == 0 { print("Oh no! Why didn't the effect get added? :'( ") }
Sep ’20