Skip to content

Digipolitan/parallax-view-controller-transition

DGParallaxViewControllerTransition

Build Status CocoaPods Compatible Carthage Compatible Platform Twitter

The ParallaxInteractiveTransition add a simple way to perform parallax interactive transition between 2 UIViewController

Demo iOS

Demo iOS

Demo tvOS

Demo tvOS

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

Works with iOS 8+, tested on Xcode 9.2

Installing

To install the DGParallaxViewControllerTransition using cocoapods

  • Add an entry in your Podfile
# Uncomment this line to define a global platform for your project
platform :ios, '8.0'

target 'YourTarget' do
  frameworks
   use_frameworks!

  # Pods for YourTarget
  pod 'DGParallaxViewControllerTransition'
end
  • Then install the dependency with the pod install command.

Usage

How to perform the transition

let viewController = UIViewController()
let parallaxTransition = DGParallaxViewControllerTransition()
parallaxTransition.attach(to: viewController)
self.present(viewController, animated: true, completion: nil)
self.parallaxTransition = parallaxTransition // You must retain the parallax transition

Configuration

You can customize the component with these options:

let viewController = UIViewController()
let parallaxTransition = DGParallaxViewControllerTransition()
parallaxTransition.presentedViewInsets = UIEdgeInsets(top: 100, left: 0, bottom: 0, right: 0)
parallaxTransition.overlayColor = .gray
parallaxTransition.maximumOverlayAlpha = 0.5
parallaxTransition.attach(to: viewController)
self.present(viewController, animated: true, completion: nil)
self.parallaxTransition = parallaxTransition // You must retain the parallax transition

Built With

Fastlane Fastlane is a tool for iOS, Mac, and Android developers to automate tedious tasks like generating screenshots, dealing with provisioning profiles, and releasing your application.

Contributing

See CONTRIBUTING.md for more details!

This project adheres to the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code. Please report unacceptable behavior to contact@digipolitan.com.

License

DGParallaxViewControllerTransition is licensed under the BSD 3-Clause license.