GithubHelp home page GithubHelp logo

drdynamicslideshow's Introduction

DRDynamicSlideShow

Create beautiful, animated, paging UIScrollViews. Easily animate views as the UIScrollView gets paged. This is perfect for welcome screens and introduction views in iOS apps.

DRDynamicSlideShow

Features

  • 1 line of code per animation.
  • Any type of value can be animated.
  • Block-driven.

Installation

There are two ways to install DRDynamicSlideShow. The first (and preferred / recommended) method is through CocoaPods. If you prefer to do it the classic way, see instructions for manual install below.

CocoaPods Install

You can install DRDynamicSlideShow through CocoaPods by adding the following to your Podfile:

pod 'DRDynamicSlideShow'

Manual Install

You can add DRDynamicSlideShow to your project by copying DRDynamicSlideShow.h and DRDynamicSlideShow.m. Ensure that they are copied into the project. Note, installing with this method will not keep DRDynamicSlideShow updated (you'll need to check GitHub).

Usage

Using DRDynamicSlideShow is easy. There are two ways to use it - either set it up programatically or with an interface. The demo project demonstrates setup with a Storyboard.

  1. Add a DRDynamicSlideShow instance to your view.

  2. Use the following method to add subviews to it on the page you want (you can simply use addSubview: as well):

     [self.slideShow addSubview:coolSubview onPage:0];
    
  3. Just need add whatever animation you want it to perform for those subviews when the specified page is being swiped.

     [self.slideShow addAnimation:[DRDynamicSlideShowAnimation animationForSubview:coolSubview page:0 keyPath:@"alpha" toValue:@0 delay:0]];
    

    OR

     [self.slideShow addAnimation:[DRDynamicSlideShowAnimation animationForSubview:coolSubview page:0 keyPath:@"alpha" fromValue:@0 toValue:@1 delay:0]];
    

Notice there are two ways for instantiating DRDynamicSlideShowAnimation. If you want the subview to animate from its current value, just use animationForSubview:page:keyPath:toValue:delay:. Otherwise, use animationForSubview:page:keyPath:fromValue:toValue:delay:.

As you can see, all we need for adding each animation is just 1 line of code! Pretty amazing, isn't it? :)

Requirements

  • Optimized for iOS 7 SDK and higher
  • Built for iOS 6 SDK or higher
  • Uses Objective-C ARC

License

DRDynamicSlideShow is available under the MIT license. Also, I'd really love to know if you are using DRDynamicSlideShow in any of your projects, so send me an email or a tweet and make my day :)

To-do

drdynamicslideshow's People

Contributors

rais38 avatar thomassnielsen avatar yangshengchaoios avatar

Watchers

 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.