项目介绍:
ImageMaskTransition
类似格瓦拉的视图控制器转场,非常适合主页和详情页有一样图片的App
Require
- iOS 8
- Swift 2
!!!!!You need to run the Demo Project on device to see blur effect
InstallCocoaPod
pod "ImageMaskTransition"
UseageHold a property of ImageMaskTransition in firstViewController
[Objective-C] 查看源文件 复制代码
var imageMaskTransiton:ImageMaskTransition?
Present a View Controller
The frame of toImageView must be the final frame after layout
[Objective-C] 查看源文件 复制代码
let dvc = DetailViewController() let config = TransitionConfig.defaultConfig(fromImageView: cell.imageView, toImageView:dvc.imageView) imageMaskTransiton = ImageMaskTransition(config: config) dvc.transitioningDelegate = imageMaskTransiton presentViewController(dvc, animated: true, completion: nil)
Push a ViewController
[Objective-C] 查看源文件 复制代码
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)
AuthorLeo, leomobiledeveloper@gmail.com
DEMO直接下载: