TestsTested | ✗ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Oct 2016 |
SwiftSwift Version | 3.0 |
SPMSupports SPM | ✗ |
Maintained by LeoMobileDeveloper.
Present then Dismiss
!!!!!You need to run the Demo Project on device to see blur effect
For Swift 2.3,See branch Swift2
CocoaPod
pod "ImageMaskTransition"
Hold a property of ImageMaskTransition
in firstViewController
var imageMaskTransiton:ImageMaskTransition?
Present a View Controller
The frame of toImageView
must be the final frame after layout
let dvc = DetailViewController()
let config = TransitionConfig.defaultConfig(fromImageView: cell.imageView, toImageView:dvc.imageView)
imageMaskTransiton = ImageMaskTransition(config: config)
dvc.transitioningDelegate = imageMaskTransiton
present(dvc, animated: true, completion: nil)
Push a ViewController
let dvc = DetailViewController()
let config = TransitionConfig.defaultConfig(fromImageView: cell.imageView, toImageView:dvc.imageView)
imageMaskTransiton = ImageMaskTransition(config: config)
self.navigationController?.delegate = imageMaskTransiton
self.navigationController?.pushViewController(dvc, animated: true)
Leo, [email protected]
ImageMaskTransition is available under the MIT license. See the LICENSE file for more info.
关于实现原理,参见这片博客