StratosParallax icon indicating copy to clipboard operation
StratosParallax copied to clipboard

Restrict an image to horizontal movement

Open tysun opened this issue 9 years ago • 2 comments

Hello

I'm wondering if it would be possible to to restrict movement to a single image in the array, for example [3], to horizontal movement only? I don't want [3] to move vertically.

Maybe on line 144 after this loop? for index in 0 ..< viewsToAnimate.count {}

tysun avatar Apr 20 '16 06:04 tysun

Well, it's not that easy. You would need a more serious configuration process where you specify the views to add to the StratosParallaxView.swift <https://github.com/ccarnino/StratosParallax/blob/master/StratosParallax/StratosParallaxView.swift> where you specify the views and if they have to be animated.

I suggest you to fork this library or take inspiration from this and apply your changes. Cheers

clacladev avatar Apr 20 '16 08:04 clacladev

Ok Thanks. I have another question.

My images are proper iP6+ sizes 2208x1242. But it looks likes they are zoomed in on my phone. I cannot see most of the elements because they are off screen.

Also it seems 4 layers is normal (ground, fore, mid, back), but can we use any number of layers?

tysun avatar Apr 20 '16 18:04 tysun