Skip to content

Commit b22527d

Browse files
committed
Merge branch 'master' of https://github.com/shles/TrueTransition
2 parents e8788e3 + 5f9c142 commit b22527d

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.DS_Store

0 Bytes
Binary file not shown.

Source/Transition.swift

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,19 @@ open class PresentTransition: Transition {
4848
}
4949
}
5050

51+
open class PresentTransitionWithoutAnimation: Transition {
52+
53+
private var controllerToPresent: () -> UIViewController
54+
55+
public init(controllerToPresent: @escaping () -> UIViewController) {
56+
self.controllerToPresent = controllerToPresent
57+
}
58+
59+
public func perform(on vc: UIViewController) {
60+
vc.present(controllerToPresent(), animated: false)
61+
}
62+
}
63+
5164
open class PopTransition: Transition {
5265
public func perform(on vc: UIViewController) {
5366
vc.navigationController?.popViewController(animated: true)

0 commit comments

Comments
 (0)