Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Wrong constraints under iOS 6

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 ?).

like image 985
DCMaxxx Avatar asked Mar 19 '14 05:03

DCMaxxx


1 Answers

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

like image 82
DCMaxxx Avatar answered Oct 31 '22 03:10

DCMaxxx