EarlGrey swizzles out |-animationDidStart:| and |-animationDidStop:| using custom implementations that provide hooks to drive EG animation synchronization code. These swizzled methods call AnimationDidStart() and AnimationDidStop() in GREYCAAnimationDelegate.m, which in turn calls the category method |-grey_setAnimationState:| on the CAAnimation provided.
When a UIViewPropertyAnimator is started and stopped within the same runloop, however, the CAAnimation is actually an instance of NSNull, so an exception is thrown because the |-grey_setAnimationState:| function is not available. AnimationDid[Start/Stop]() should be updated to check whether |animation| is NSNull before attempting this call.
Comment 1 by huangml@chromium.org
, May 31 2018