3 ms·
I like how smoothly they flow. Looks like Apple load-tested a continuous stream of notifications.
by asadlionpk 11y ago
I like how smoothly they flow. Looks like Apple load-tested a continuous stream of notifications.
- CGamesPlay 11y agoIt's actually just a product of how animations work in OS X / iOS. When you play an animation, it takes the place it is currently on the screen and tweens to the place it needs to be on the screen. This means if you stack two animations, the second one takes priority, but the duration stays the same, so what happens is something like this: N1, N2, ... NN are notifications. Time 0 ms: N1 is delivered. It appears at y=0 with no animation. Time 100 ms: N2 is delivered. It appears at y=0 with no animation. N1 is animated to y=50 over 100 ms. Time 150 ms: N3 is delivered. It appears at y=0 with no animation. N2 is animated to y=50 over 100 ms. N1 is currently at y=25 (halfway through its animation) and is now animated to y=100 over 100ms. Now N1 appears to accelerate downward while N2 is moving at half the speed downward, and N3 is behind both of the notifications waiting to be pushed down. The effect is like a waterfall of notifications accelerating downwards, without ever explicitly coding it that way.