Skip to content

Commit 9c1b5d6

Browse files
committed
Update README.md
1 parent 944711f commit 9c1b5d6

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

README.md

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
</p>
1212

1313
## About the Project
14-
This is my example of an easy-to-use **Navigation Coordinator**, written in just 50 lines of code and built using SwiftUI **NavigationStack** (iOS 16).
14+
Easy-to-use **Navigation Coordinator**, written in just 50 lines of code and built using the SwiftUI **NavigationStack** (iOS 16).
1515

1616
## Core Features
1717
The current implementation covers 4 main transitions:
@@ -27,7 +27,8 @@ The current implementation covers 4 main transitions:
2727
- Swift 5.7+
2828

2929
## Why This Is Interesting
30-
The implementation of the `unwind` transition may be of particular interest to those who have already attempted to create similar transitions in SwiftUI.
30+
- The implementation of the `unwind` transition may be of particular interest to those who have already attempted to create similar transitions in SwiftUI.
31+
- In addition to the specific task of multi-level return, the `unwind()` function can also be used instead of the usual `pop()` when it is necessary to pass data back to the previous screen. This can be critically important for unidirectional architectures. The `onUnwind()` call will be made before the `onAppear()` call.
3132

3233
## Usage Examples
3334

@@ -114,13 +115,13 @@ struct A: View {
114115
</details>
115116

116117
## Using into Your Project
117-
This is simply an example of a navigation approach. Feel free to take it, modify it, and use it as you see fit.
118+
Feel free to take it, modify it, and use it as you see fit.
118119

119-
You can simply take the [NavigationCoordinator.swift](https://github.com/silkodenis/swiftui-navigation-coordinator/tree/main/Navigation/Navigation/NavigationCoordinator.swift) and use it as you see fit in your project. It is an independent and tested component that manages `NavigationPath`.
120+
You can take only the [NavigationCoordinator](https://github.com/silkodenis/swiftui-navigation-coordinator/tree/main/Navigation/Navigation/NavigationCoordinator.swift) and use it as you see fit in your project. It is an independent and tested component that manages the `NavigationPath`.
120121

121-
Or you can utilize the full [infrastructure](https://github.com/silkodenis/swiftui-navigation-coordinator/tree/main/Navigation/Navigation) from my example:
122+
But I recommend utilizing the full [infrastructure](https://github.com/silkodenis/swiftui-navigation-coordinator/tree/main/Navigation/Navigation) from my example:
122123

123-
<details>
124+
<details open>
124125
<summary><b>RootView</b></summary>
125126

126127
Configure the App to run with RootView.
@@ -153,10 +154,10 @@ struct SomeApp: App {
153154
```
154155
</details>
155156

156-
<details>
157+
<details open>
157158
<summary><b>Scene</b></summary>
158159

159-
Configure the `Scene` for your project. In the view property, I recommend not using direct View initialization, but instead employing your favorite Dependency Injection pattern, such as 'View Factory', to connect various dependencies to your 'ViewModel' from outside.
160+
Configure the `Scene` for your project. In the view property, I recommend avoiding direct View initialization. Instead, use your preferred Dependency Injection pattern, such as **View Factory**, to externally connect various dependencies to your **ViewModel**.
160161

161162
```swift
162163
import SwiftUI
@@ -202,10 +203,10 @@ extension Screen {
202203
```
203204
</details>
204205

205-
<details>
206+
<details open>
206207
<summary><b>UnwindSegueModifier</b></summary>
207208

208-
Finally, add `UnwindViewModifier.swift` to your project.
209+
Finally, add the `UnwindViewModifier` to your project to implement the `onUnwind()` call in your view, similar to `onAppear()`.
209210

210211
```swift
211212
import SwiftUI
@@ -233,4 +234,4 @@ extension View {
233234

234235
## License
235236

236-
Apache License 2.0 license. See the [LICENSE](https://github.com/silkodenis/swiftui-navigation-coordinator/blob/main/LICENSE) file for details.
237+
**Apache License 2.0**. See the [LICENSE](https://github.com/silkodenis/swiftui-navigation-coordinator/blob/main/LICENSE) file for details.

0 commit comments

Comments
 (0)