Skip to content

Commit

Permalink
Replace deprecated NavigationView
Browse files Browse the repository at this point in the history
  • Loading branch information
FelixHerrmann committed Dec 28, 2023
1 parent 923fc2e commit 834b790
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ navigationController.pushViewController(acknowledgmentsViewController, animated:
import SwiftPackageListUI

var body: some View {
NavigationView {
NavigationStack {
AcknowledgmentsList()
}
}
Expand Down
10 changes: 5 additions & 5 deletions Sources/SwiftPackageListUI/SwiftUI/AcknowledgmentsList.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,19 @@ import SwiftUI

/// A `List` that shows all licenses from the package-list file.
///
/// It can be used as the root view in a `NavigationView`:
/// It can be used as the root view in a `NavigationStack`:
/// ```swift
/// var body: some View {
/// NavigationView {
/// NavigationStack {
/// AcknowledgmentsList()
/// }
/// }
/// ```
///
/// It also can be used within a `NavigationLink` to be pushed on the `NavigationView`:
/// It also can be used within a `NavigationLink` to be pushed on the `NavigationStack`:
/// ```swift
/// var body: some View {
/// NavigationView {
/// NavigationStack {
/// List {
/// NavigationLink("Acknowledgments") {
/// AcknowledgmentsList()
Expand All @@ -34,7 +34,7 @@ import SwiftUI
/// }
/// ```
///
/// - Important: This view must be used inside a `NavigationView` to function properly.
/// - Important: This view must be used inside a `NavigationStack` to function properly.
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
public struct AcknowledgmentsList: View {

Expand Down

0 comments on commit 834b790

Please sign in to comment.