Skip to content

EasyTransition is a simple library for make a transition in iOS written in Swift.

License

Notifications You must be signed in to change notification settings

sgonzalesallan/EasyTransition

 
 

Repository files navigation

EasyTransition

Build Status Cocoapods Compatible Carthage Compatible GitHub license Platform Twitter

EasyTransition is a simple library for make a transition in iOS.

example

Live preview

Features

  • Transition from corners
  • Interactive dismissal transition
  • Scalable to background view controller
  • Blur Effect
  • In-Out transition direction

Limitation

  • This library can be compile with iOS 8.0+ but transition work on iOS 8.3+

Requirements

  • Swift 2+
  • iOS 8.3+

Installation

You can install this library in 2 ways

Manually

Copy EasyTransition.swift and UIView+Constraints.swift to your project and give me some beer.

CocoaPods

CocoaPods is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate EasyTransition into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
use_frameworks!

pod 'EasyTransition', '~> 1.1'

Then, run the following command:

$ pod install

Carthage

Carthage is a decentralized dependency manager that builds your dependencies and provides you with binary frameworks.

You can install Carthage with Homebrew using the following command:

$ brew update
$ brew install carthage

To integrate EasyTransition into your Xcode project using Carthage, specify it in your Cartfile:

github "indevizible/EasyTransition" ~> 1.0

Run carthage update to build the framework and drag the built EasyTransition.framework into your Xcode project.

Usage

Import and declare EasyTransition:

import EasyTransition

class ViewController: UIViewController {
  var transition: EasyTransition?
}

Customise transition and present normally:

let vc = TargetViewController()
transition = EasyTransition(attachedViewController: vc)
transition?.transitionDuration = 0.4
transition?.direction = .Right
transition?.margins = UIEdgeInsets(top: 0, left: 100, bottom: 0, right: 0)
presentViewController(vc, animated: true, completion: nil)

You can also make a direction from a corner:

transition?.direction = [.Top,.Right]

And more on EasyTransitionExample.xcodeproj

Sources Used

Author

Nattawut Singhchai, [email protected]

License

EasyTransition is available under the MIT license. See the LICENSE file.

About

EasyTransition is a simple library for make a transition in iOS written in Swift.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Swift 96.6%
  • Ruby 1.8%
  • Objective-C 1.6%