EasyTransition is a simple library for make a transition in iOS.
- Transition from corners
- Interactive dismissal transition
- Scalable to background view controller
- Blur Effect
- In-Out transition direction
- This library can be compile with iOS 8.0+ but transition work on iOS 8.3+
- Swift 2+ (use v.1.2)
- Swift 3 (2.1)
- iOS 8.3+
You can install this library in 2 ways
Copy EasyTransition.swift and UIView+Constraints.swift to your project and give me some beer.
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', '~> 2.1'
Then, run the following command:
$ pod install
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" ~> 2.1
Run carthage update
to build the framework and drag the built EasyTransition.framework
into your Xcode project.
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)
present(vc, animated: true, completion: nil)
You can also make a direction from a corner:
transition?.direction = [.top,.right]
And more on EasyTransitionExample.xcodeproj
- www.subtlepatterns.com
- www.unsplash.com
- Alamofire/Alamofire for CocoaPods and Carthage description
- prolificinteractive/NavigationControllerBlurTransition for UIView+Constraints.swift
Nattawut Singhchai, [email protected]
EasyTransition is available under the MIT license. See the LICENSE file.