Code Monkey home page Code Monkey logo

wyinteractivetransitions's Introduction

WYInteractiveTransitions

Version License Platform Swift 2.0

Interactive only can be done with UINavigationController? No! WYInteractiveTransitions come to rescue, bringing interactive transition to model presentation between view controllers.

Customized transitions between view controllers for iOS. One Line of code with fully interactive animations. Written purely in Swift.

Four animations is embedded right now:

  • Push

* SlideUp

* Swing

* Zoom

  • And your customized animations

Installation

WYInteractiveTransitions is available through CocoaPods.

To install it, simply add the following line to your Podfile:

pod "WYInteractiveTransitions"

Or download the git repository

 git clone https://github.com/yuwang17/WYInteractiveTransitions.git

Drag WYInteractiveTransitions.swift file into your own project

Then import the module in your file

import WYInteractiveTransitions

If you're Objective-C user, please include the header file

#import "WYInteractiveTransitions-Swift.h"

Usage

  1. Create instance
let transitionMgr = WYInteractiveTransitions()
  1. Configure WYInteractiveTransitions in proper position
transitionMgr.configureTransition(duration: 0.5, toView: toView!, panEnable: true, type: WYTransitoinType.Up)
  1. Present view controller or dismiss would invoke the transitions
  • performSegueWithIdentifier
  • presentViewController
  • dismissViewController
  • unwindViewController
  • etc...

Example Codes

let transitionMgr = WYInteractiveTransitions()
 override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
 if segue.identifier == "showSegue" {
   let toView = segue.destinationViewController as? UIViewController
     transitionMgr.configureTransition(duration: 0.5, toView: toView!, panEnable: true, type: WYTransitoinType.Up)
  }
}

Demo

  1. Download the repository
 git clone https://github.com/yuwang17/WYInteractiveTransitions.git
 cd WYInteractiveTransitions/Example
  1. Open the workspace
 open WYInteractiveTransitions.xcodeproj
  1. Compile and run the app in simulator
  • Under Xcode, press Ctrl + R

Requirements

  • Xcode 6
  • iOS 7

LICENSE

WYInteractiveTransitions is available under the MIT License, see LICENSE for more infomation.

wyinteractivetransitions's People

Contributors

eliteman22 avatar matthijsotterloo avatar tedko avatar yu-w avatar

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

wyinteractivetransitions's Issues

App crashes when segue presentation is Over Full Scren

Currently using these transitions, but I have ran into one significant issue. When segueing to a storyboard with it's presentation as type Over Full Screen, the app crashes with the error:
fatal error: unexpectedly found nil while unwrapping an Optional value

Currently segueing using storyboards and have a prepareForSegue function in my view controller.

override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        if (segue.identifier == "settings") {
            let duration = 0.6
            WYTransitionMgr.configureTransition(duration, toViewController: segue.destinationViewController, handGestureEnable: true, transitionType: .Up)
        }
    }

Any help would be appreciated, thanks!

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.