GithubHelp home page GithubHelp logo

ttparallaxonboarding's Introduction

TTParallaxOnboarding

SPM compatible License: MIT Twitter

About

Lightweight library to and example project to build beautiful parallaxing onbaording slides. Achive onboarding slides that have depth effect when in motion in a few simple steps.

This project is maintained by Tapptitude, a mobile app development agency specialized in building high-quality iOS and Android mobile apps, for startups and brands alike. A lively team of skilled app developers and app designers based in Europe, we provide full-stack mobile app development services to entrepreneurs looking to innovate on mobile.

Requirements

  • iOS 11.0+
  • Xcode 10.0+

Installation

Swift Package Manager

Xcode > File > Swift Packages > Add Package Dependency... > Paste https://github.com/tapptitude/TTParallaxOnboarding

Manually

Add the contents of Sources/TTParallaxOnboarding folder to your project.

Usage

Best way to understand how to use the library is to clone and open the example project.

  1. Build your art view in a single container view but keep the slides organized into a horizontal stack view. See OboardingView in the example project.

  2. Create an TTParallaxScrollView either from code using the interface builder.

  3. Add the art view to the scrollview

let onboardingView = OnboardingView()
scrollView.set(contentView: onboardingView, pageCount: 3)
  1. Assign a depth to each of your layer view. The depth value needs to be betwen 0.0 and 1.0. The greater the value is the farther the object will look when scrolling. For example some distant mountains would be 0.9 and somehting just in front of the scene will be 0.0 (this will scroll at the same rate with the ScrollView).
self.scrollView.addParallax(to: onboardingView.rocket, depth: 0.4)
self.scrollView.addParallax(to: onboardingView.mountain, depth: 0.7)

If you want something to reamin stationary assign it the value of 1.0.

Contribution

Feel free to Fork, submit Pull Requests or send us your feedback and suggestions!

License

TTParallaxOnboarding is available under the MIT license. See the LICENSE file for more info.

ttparallaxonboarding's People

Contributors

efraimb avatar

Watchers

Cocan Lucian Marius avatar James Cloos avatar  avatar  avatar  avatar

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.