Parallax is an iOS library that reproduces the parallax effect of the iOS7 home screen.
- QuartzCore
- CoreMotion
- Add the Parallax directory into your project.
- Add
#import "ACParallax.h"
to your view controller. - Add a ACParallax view and start the parallax effect with
parallaxView.parallax = YES;
Optional:
If you want a delegate to be notified of begin/end parallax effect and changes in the motion attitude:
parallaxView.parallaxDelegate = self;
If you want the parallax view to refocus slowly and automatically:
parallaxView.refocusParallax = YES;
Use CocoaPods add Parallax to your project.
- Add a pod entry for Parallax to your Podfile
pod 'Parallax', '~> 0.0.1'
- Install the pod(s) by running:
pod install
- Device pitch is not handled correctly; behaves weirdly when the device is held straight up.
- Some implementations details missing (see TODOs)
San Francisco Bridge by Jeff Gunn (Creative Commons)
Cocoapods specs by Bruno Furtado