Frage

I am trying to reproduce the parallax effect we can see everywhere nowadays, where, whenever you pull down a scrollview, an image reveals behind it (see this question).

There's a bunch of solutions on the internet, but I'm trying to make it work using auto layout only. I saw someone got it working at a lightning talks a few days ago, but I guess I wasn't paying enough attention...

I got it working under iOS 7, however, under iOS 6, the image view doesn't stick to the top. Here's a sample projet with where I am right now : DCParallaxHeader.

Another question is, is there any way to make the bottom view size's dynamic depending on the screen's size ? (As it it wrapped in a scrollview, and we must provided the contentSize using the constraints too ?).

War es hilfreich?

Lösung

The person who make the talk wrote a blog post about it. Sums it all :-).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top