-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestRouter.swift
More file actions
38 lines (28 loc) · 1.14 KB
/
Copy pathTestRouter.swift
File metadata and controls
38 lines (28 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import UIKit
private let whiteTintColor = UIColor(white: 0.8, alpha: 1)
private let authAlongsideTransition = { (context: UIViewControllerTransitionCoordinatorContext) -> Void in
let fromView = context.view(forKey: .from)
let toView = context.view(forKey: .to)
UIView.performWithoutAnimation {
fromView?.alpha = 1
toView?.alpha = 0
context.containerView.enumerateSubviews { view in
if "\(view)".contains("_UIParallaxDimmingView") {
view.backgroundColor = .clear
}
}
}
fromView?.alpha = 0
toView?.alpha = 1
}
final class TestRouter: BaseRouter {
// MARK: - Alongsize Animation -
override func alongsideTransitionForPushing(viewController: UIViewController) -> ((UIViewControllerTransitionCoordinatorContext) -> Void)? {
//return nil
return authAlongsideTransition
}
override func alongsideTransitionForPopping(viewControllers: [UIViewController]) -> ((UIViewControllerTransitionCoordinatorContext) -> Void)? {
//return nil
return authAlongsideTransition
}
}