Code Monkey home page Code Monkey logo

parallax's Introduction

Parallax

Parallax is an iOS library that reproduces the parallax effect of the iOS7 home screen.

Build Status Cocoapods Cocoapods

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 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

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)

Cocoapods specs by Bruno Furtado

parallax's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

parallax's Issues

Labels erased

Hello,

Good job, I really love your work. But I have just a little problem with it. When I move, different UILabels are partially erased.

photo

Do you have an idea?

Gimbal lock

The problem you are experiencing with pitch is called Gimbal lock, it happens every time a rotation plane is parallel to another one. To avoid that you should use the attitude transformation matrix, or (better) the quaternion property.

Use of undeclared identifier 'DBL_MAX'

xcodebuild error

  • error: use of undeclared identifier 'DBL_MAX'

Parallax/Parallax/ACAttitude.m:12:60
Parallax/Parallax/ACAttitude.m:12:77
Parallax/Parallax/ACAttitude.m:12:93

Cant limit the effect

Be fine limit the maximum effect. When i put the ipad on horizontal position i can see the white screen behind the background.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.