Thank you for your reply. I did implement it as suggested, and for the most part it works great.
However, I believe I found a problem and potential bug when a UIViewPropertyAnimator is configured in didMoveToWindow in a view that is being presented in a popover. This bug can be reproduced in the following example code:
https://github.com/tcwalther/PropertyAnimatorPresent/tree/29812e53a8b6d413a156d26de3fe3c01792df9a9
In this code, there are two view controllers. The first one contains a button that presents the second view controller as a popover. The second view controller contains one view of type AnimatedView.
The AnimatedView has a UIViewPropertyAnimator that is being configured on didMoveToWindow. When that configuration is called, the property animation works fine, but the popover presentation animation is broken. Have a look at the following screenshots:
Can you advise me how to fix the popover animation?
Topic:
UI Frameworks
SubTopic:
UIKit
Tags: