Skip to content

Commit 4db8636

Browse files
committed
doc: Added updates related to version 0.6.x
1 parent 1cab274 commit 4db8636

1 file changed

Lines changed: 30 additions & 2 deletions

File tree

README.md

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ If you'd like to contribute a translation, please [open a PR](https://github.com
6666
```swift
6767
navigator.sheet(paths: ["sheetPage"], items: [:], isAnimated: true)
6868

69-
navigator.fullSheet(paths: ["page1", "page2"], items: [:], isAnimated: true)
69+
navigator.fullSheet(paths: ["page1", "page2"], items: [:], isAnimated: true, prefersLargeTitles: false)
7070
```
7171

7272
- close a modal and call completion closure.
@@ -116,7 +116,8 @@ If you'd like to contribute a translation, please [open a PR](https://github.com
116116
items: [:],
117117
isAnimated: true,
118118
iPhonePresentationStyle: .fullScreen,
119-
iPadPresentationStyle: .pageSheet)
119+
iPadPresentationStyle: .pageSheet,
120+
prefersLargeTitles: .none)
120121
```
121122

122123
- forcely reload the last page behind the modal. This is useful when you need to call the [onAppear(perform:)](https://developer.apple.com/documentation/swiftui/view/onappear(perform:)) again.
@@ -291,6 +292,33 @@ let package = Package(
291292

292293
<br>
293294

295+
## - Extra
296+
297+
- Q: **How can I use large titles in SwiftUI?**
298+
```swift
299+
/// in AppMain.swift (MVI)
300+
/// To use for route navigation, set the prefersLargeTitles parameter to true in the launch method.
301+
302+
navigator
303+
.launch(paths: ["home"], items: [:], prefersLargeTitles: true)
304+
305+
306+
/// in HomeView.swift (MVI)
307+
/// To specify the display mode of the navigation bar title, use the navigationBarTitleDisplayMode (.line, .large, .automatic) in the SwiftUI screen of each screen.
308+
ScrollView {
309+
....
310+
}
311+
.navigationBarTitleDisplayMode(.large)
312+
.navigationTitle("Home")
313+
314+
315+
/// If you want to use it in fullSheet or customSheet,
316+
/// Home.intent (MVI)
317+
/// To enable large titles, set the prefersLargeTitles variable to true. To maintain the current settings, use .none.
318+
navigator.fullSheet(paths: ["page1", "page2"], items: [:], isAnimated: true, prefersLargeTitles: true)
319+
```
320+
321+
294322
## - License
295323

296324
This library is released under the MIT license. See [LICENSE](https://github.com/interactord/LinkNavigator/blob/main/LICENSE.md) for details.

0 commit comments

Comments
 (0)