• Stars
    star
    121
  • Rank 293,924 (Top 6 %)
  • Language
    Swift
  • License
    MIT License
  • Created about 8 years ago
  • Updated over 7 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Elegant image transition between view controllers,support both Modal and Push

Version Platform Language License

Present then Dismiss

Require

  • iOS 8
  • Swift 3.0

!!!!!You need to run the Demo Project on device to see blur effect

For Swift 2.3,See branch Swift2

Install

CocoaPod

pod "ImageMaskTransition"

Useage

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)

Author

Leo, [email protected]

License

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

中文

关于实现原理,参见这片博客

实现一个复杂动画的界面转场(Swift)

More Repositories

1

ios-developer-tools

Tools that every iOS developer should know.
Swift
1,667
star
2

Blogs

一点心得 - iOS,Swift,React Native,Python...
Objective-C
1,593
star
3

ReactNativeMaterials

React Native的中文参考资料,包括开源库,文字/视频资料,相关工具等
704
star
4

PullToRefreshKit

【Deprecated】Pull to refresh in Swift, easy to use, easy to customize(下拉刷新/QQ/淘宝/优酷/雅虎天气/大众点评)
Swift
554
star
5

awesome-rxswift

An "awesome" type curated list of RxSwift library and learning material
Swift
500
star
6

QTEventBus

iOS事件总线,支持AppDelegate解耦,支持基于响应链的局部总线
Objective-C
428
star
7

MDTable

A data-driven UITableView framework
Swift
162
star
8

LeoDanmakuKit

An iOS Danmaku Kit (添加纯文字弹幕)
Objective-C
52
star
9

LHPerformanceStatusBar

A status bar to show FPS, CPU and memory usage
Objective-C
51
star
10

WCGradientCircleLayer

Draw Gradient Layer from one color to another
Objective-C
36
star
11

ParallexBanner

【Deprecated】A banner scrollview to show images with parallex effect
Swift
30
star
12

LHNavigationController

像网易新闻那样,支持全屏push/pop的导航控制器(A NavigationController that allow you to push/pop with full screen gesture)
Objective-C
26
star
13

DraggableTableView

【Deprecated】Extension for the UITableView that allows a user to move cells with long press and drop.
Swift
26
star
14

LHProgressHUD

A modern ProgressHUD with wonderful animation
Objective-C
23
star
15

LHCityPickerController

包含所有地级市的城市选择控制器,和大众点评类似
Objective-C
13
star
16

React-Native-Files

A project used to store temp files
12
star
17

SwiftDynamicTableviewHeight

A project about how to do dynamic height with system cell
Swift
12
star
18

LeoMobileDeveloper

1
star