# Parallax **Repository Path**: mirrors/Parallax ## Basic Information - **Project Name**: Parallax - **Description**: Parallax 是一个 iOS 库用来实现类似 iOS 7 首屏的视差效果 - **Primary Language**: Objective-C - **License**: BSD-2-Clause - **Default Branch**: master - **Homepage**: https://www.oschina.net/p/ios-parallax - **GVP Project**: No ## Statistics - **Stars**: 1 - **Forks**: 0 - **Created**: 2020-09-09 - **Last Updated**: 2026-01-17 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Parallax Parallax is an iOS library that reproduces the parallax effect of the iOS7 home screen. [![Build Status](https://api.travis-ci.org/acoomans/Parallax.png)](https://api.travis-ci.org/acoomans/Parallax.png) [![Cocoapods](https://cocoapod-badges.herokuapp.com/v/Parallax/badge.png)](http://beta.cocoapods.org/?q=on%3Aios%20name%3Aparallax%2A) [![Cocoapods](https://cocoapod-badges.herokuapp.com/p/Parallax/badge.png)](http://beta.cocoapods.org/?q=on%3Aios%20name%3Aparallax%2A) ## Dependencies - QuartzCore - CoreMotion ## Usage 1. Add the _Parallax_ directory into your project. 2. Add `#import "ACParallax.h"` to your view controller. 3. 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; ## Install with CocoaPods Use [CocoaPods](http://cocoapods.org) 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 ``` ## Screenshot ![screenshots](https://raw.github.com/acoomans/Parallax/master/ParallaxDemo/parallax.gif) ## Bugs - Device pitch is not handled correctly; behaves weirdly when the device is held straight up. - Some implementations details missing (see TODOs) ## Thanks [San Francisco Bridge by Jeff Gunn (Creative Commons)](http://www.flickr.com/photos/jeffgunn/6663234085/) Cocoapods specs by [Bruno Furtado](https://github.com/Bruno-Furtado)