stripe-ios icon indicating copy to clipboard operation
stripe-ios copied to clipboard

Fix iPad animation when moving from Apple Pay to PaymentSheet

Open davidme-stripe opened this issue 4 months ago • 0 comments

Summary

When cancelling Apple Pay and returning to PaymentSheet on iPad, the system's fade-in animation underneath the form sheet is inexplicably following the transition animation from the rotating card brand view, and waits for the brand to rotate once before executing.

I've dug into this a fair amount and tried rebuilding the RotatingCardBrandView, but in the end it seems like any UIViewPropertyAnimator causes this behavior. As a hacky workaround, we'll just wait for one turn of the runloop before kicking off our animation.

Motivation

Fixing a small visual issue on iPad

Testing

In PaymentSheet Example

Changelog

None

davidme-stripe avatar Feb 27 '24 23:02 davidme-stripe