TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Oct 2017 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by Liyao Chen.
Use blur transiton effect in 2 steps.
First, subclass your dialog view controller.
Second, chose tranistion style you want.
You can easily subclass TransitionViewController
to achieve blur background effect.
There have 2 kind of background effect. Blur and black with alpha.
enum TransitionStyle {
case black(CGFloat)
case blur(UIBlurEffectStyle)
}
Support 4 direction (top, bottom, left, right)
enum TransitionPosition {
case top, bottom, left, right
}
// 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")
}
}
TransitionViewController is available through CocoaPods. To install
it, simply add the following line to your Podfile:
pod 'TransitionViewController'
Liyao Chen, [email protected]
TransitionViewController is available under the MIT license. See the LICENSE file for more info.