GithubHelp home page GithubHelp logo

gliyao / transitionviewcontroller Goto Github PK

View Code? Open in Web Editor NEW
9.0 3.0 1.0 2.55 MB

Using customize native transition view controller with xib

License: MIT License

Swift 90.70% Ruby 9.30%
ios- animation- swift-

transitionviewcontroller's Introduction

TransitionViewController

Build Status Version License Platform codecov Support 

Use blur transiton effect in 2 steps.

First, subclass your dialog view controller. Second, chose tranistion style you want.

Support Xib

You can easily subclass TransitionViewController to achieve blur background effect.

Background Effet

There have 2 kind of background effect. Blur and black with alpha.

enum TransitionStyle {
	case black(CGFloat)
	case blur(UIBlurEffectStyle)
}

Present and Dismiss Direction

Support 4 direction (top, bottom, left, right, none)

enum TransitionPosition {
	case top, bottom, left, right, none
}

How To Use

// 1. Subclass for your dialog view controller
class YourPopupViewController: TransitionViewController {
	override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
		super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
		
		// 2. Change transition here!!
		self.transition = TransitionAnimator(style: .blur(.light), presentFrom: .bottom, dismissTo: .bottom)
	}

	required init?(coder aDecoder: NSCoder) {
		fatalError("init(coder:) has not been implemented")
	}
}

Requirements

  • iOS 8.0 or later

Installation

TransitionViewController is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'TransitionViewController'

Author

Liyao Chen, [email protected]

License

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

transitionviewcontroller's People

Contributors

gliyao avatar liyaochen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

senseiphonex

transitionviewcontroller's Issues

支援Obj-C

有計畫支援IOS8 or IOS9+的obj-C 版本嗎

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.