forked from davdroman/swiftui-navigation-transitions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Default.swift
26 lines (24 loc) · 794 Bytes
/
Default.swift
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
extension AnyNavigationTransition {
/// The system-default transition.
///
/// Use this transition if you wish to modify the interactivity of the transition without altering the
/// system-provided transition itself. For example:
///
/// ```swift
/// NavigationStack {
/// // ...
/// }
/// .navigationStackTransition(.default, interactivity: .pan) // enables full-screen panning for system-provided pop
/// ```
///
/// - Note: The animation for `default` cannot be customized via ``animation(_:)``.
public static var `default`: Self {
.init(Default())
}
}
@_spi(package) public struct Default: PrimitiveNavigationTransition {
init() {}
public func transition(with animator: Animator, for operation: TransitionOperation, in context: Context) {
// NO-OP
}
}