Search code examples
iosfacebookios7parallax

Facebook News paper app, full size image parallax effect


I was playing with the Facebook paper app, and realized the parallax effect on the full size image is very cool. So i went to try it on my own app. but the parallax was not moving as smooth as the facebook paper app.

here is the code i used

UIInterpolatingMotionEffect *parallaxHorizontal = [[UIInterpolatingMotionEffect alloc]initWithKeyPath:@"center.x" 
                                                                                                type:UIInterpolatingMotionEffectTypeTiltAlongHorizontalAxis];
parallaxHorizontal.minimumRelativeValue = @-100.0;
parallaxHorizontal.maximumRelativeValue = @100.0;

[_myImageView addMotionEffect:interpolationHorizontal];

is there anyway to make the parallax move slightly faster and smoother, or achieve like facebook paper app.

Thanks!


Solution

  • maybe you can try my answers on another post, but it was not accepted. but i was able to recreate the same effect.

    https://stackoverflow.com/a/21545699/3286623