UIDynamicAnimatorDelegate
To respond to the pausing or resumption of UIKit dynamic animation, configure a custom class to adopt the Uidynamicanimatordelegate protocol. Then, in a dynamic animator (an instance of the Uidynamicanimator class), set the delegate to be an instance of your custom class.
Declaration
@MainActor protocol UIDynamicAnimatorDelegate : NSObjectProtocol