NavView: Switch to NavigationStack for iOS 17 and up
iOS 17 fixes the issues that NavigationStack had with iOS 16. This means that futureproofing is fixed. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
parent
13a40a237a
commit
2e746320cf
1 changed files with 10 additions and 12 deletions
|
|
@ -14,18 +14,16 @@ struct NavView<Content: View>: View {
|
|||
@ViewBuilder var content: Content
|
||||
|
||||
var body: some View {
|
||||
// Uncomment once NavigationStack issues are fixed
|
||||
/*
|
||||
if #available(iOS 16, *) {
|
||||
NavigationStack {
|
||||
content
|
||||
}
|
||||
} else {
|
||||
*/
|
||||
NavigationView {
|
||||
content
|
||||
// NavigationStack issues are fixed on iOS 17
|
||||
if #available(iOS 17, *) {
|
||||
NavigationStack {
|
||||
content
|
||||
}
|
||||
} else {
|
||||
NavigationView {
|
||||
content
|
||||
}
|
||||
.navigationViewStyle(.stack)
|
||||
}
|
||||
.navigationViewStyle(.stack)
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue