You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: Docs/AnimatingRoutes.md
+9-5
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,9 @@
1
1
# Animating routes
2
2
3
+
Simulating screen transitions à la iOS.
4
+
5
+
## Introduction
6
+
3
7
On a platform like iOS, users may expect animated screen transitions when navigating through the app. (Less so the case with macOS) Apps get these transitions for free with `NavigationView`. But with SwiftUI Router, however, this is not the case. Ideally, you want a transition that differs as the user goes forward (deeper) in the app and when they go back (higher).
4
8
5
9
SwiftUI Router exposes the `Navigator` environment object. An object that allows for navigation done programmatically. It also contains the property `.lastAction`, which is of type `NavigationAction?`. This object contains read-only information about the last navigation that occurred. Information like the previous path, the current path, whether the app navigated forward or back. But also the *direction* of the navigation, which is what we're interested in right now.
With **SwiftUI Router** you can power your SwiftUI app with pathbased routing. By utilizing a pathbased system, navigation in your app becomes more flexible and easier to maintain.
11
+
With **SwiftUI Router** you can power your SwiftUI app with path-based routing. By utilizing a path-based system, navigation in your app becomes more flexible and easier to maintain.
Easy and maintainable app navigation with path based routing for SwiftUI.
4
+
5
+

6
+
7
+
With **SwiftUI Router** you can power your SwiftUI app with path based routing. By utilizing a path based system, navigation in your app becomes more flexible and easier to maintain.
8
+
9
+
### Additional content
10
+
- Examples can be found on [Github](https://github.com/frzi/SwiftUIRouter-Examples)
0 commit comments