I'm trying to achieve an effect that is present in long lists on iOS.

In the contact app there's a long list of names and there's a sticky letter showing which is the letter you have scrolled to. When you scroll and the letters overlap the previous is pushed out if the way.

Even with scripting I'm finding it difficult to achieve this effect. How would you do it?

Interested in horizontal and vertical solutions.