Latest 2.1.0
Homepage https://github.com/Parallaxer/Parallaxer
License MIT
Platforms ios 8.0, osx 10.10, tvos 9.0, watchos 2.0, requires ARC
Authors

Parallaxer is a framework for crafting parallax effects in Swift.

Requirements

  • Swift 3.0

Installation

With Carthage

github "Parallaxer/Parallaxer"

With CocoaPods

use_frameworks!
pod 'Parallaxer'

Overview

Parallax effects are achieved by composing a tree of ParallaxEffect objects,
or parallax tree. Below is a brief description of the types used to construct
nodes in a parallax tree. See source files for more documentation.

  • ParallaxEffect:

    • A node in a parallax tree.
    • Values are set, or seeded, at the root.
    • Nested effects express values in relation to their parent.
  • ParallaxInterval:

    • A bidirectional interval with boundaries such that from != to.
  • ParallaxCurve:
    • Used by an effect to transform progress inherited from its parent.

Usage

Percentage example

import Parallaxer
var percentage: Double?

// Define an effect that expresses a value as a percentage of its parent interval.
let calculatePercentage = ParallaxEffect(
    over:   ParallaxInterval(from: 0, to: 100),
    change: { percentage = $0 as Double }
)

var root = ParallaxEffect(over: ParallaxInterval(from: 0, to: 4))
root.addEffect(calculatePercentage)

root.seed(withValue: 2)
print(percentage) // Output: 50.0

PhotoBook example project

Check out PhotoBook, an example project which showcases
the Parallaxer framework.

License

Parallaxer is maintained by Clifton Roberts and released
under the MIT license. See LICENSE for details.

Latest podspec

{
    "name": "Parallaxer",
    "version": "2.1.0",
    "summary": "A framework for composing parallax effects in Swift.",
    "homepage": "https://github.com/Parallaxer/Parallaxer",
    "license": "MIT",
    "authors": {
        "Clifton Roberts": "[email protected]"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.10",
        "tvos": "9.0",
        "watchos": "2.0"
    },
    "source": {
        "git": "https://github.com/Parallaxer/Parallaxer.git",
        "tag": "2.1.0"
    },
    "requires_arc": true,
    "source_files": "Sources/**/*.swift",
    "module_name": "Parallaxer",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This