When working on a large project spanning several developers, I often find that each developer has their own personal favorite animation timing. On our latest project, I implemented a simple UIView extension that lets us standardize these durations across the app using named enum values rather than inline floats or global constants. Here’s the extension:
And here’s an example of how to use it in practice:
As always, feel free to reach out to us with questions or comments @untoldhq on Twitter.