欢迎光临
我们一直在努力

[Swift]类格瓦拉的炫酷视图控制器转场

建站超值云服务器,限时71元/月

[Swift]类格瓦拉的炫酷视图控制器转场

项目介绍:

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直接下载:

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » [Swift]类格瓦拉的炫酷视图控制器转场
分享到: 更多 (0)