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
|
@ViewBuilder var content: Content
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
// Uncomment once NavigationStack issues are fixed
|
// NavigationStack issues are fixed on iOS 17
|
||||||
/*
|
if #available(iOS 17, *) {
|
||||||
if #available(iOS 16, *) {
|
NavigationStack {
|
||||||
NavigationStack {
|
content
|
||||||
content
|
}
|
||||||
}
|
} else {
|
||||||
} else {
|
NavigationView {
|
||||||
*/
|
content
|
||||||
NavigationView {
|
}
|
||||||
content
|
.navigationViewStyle(.stack)
|
||||||
}
|
}
|
||||||
.navigationViewStyle(.stack)
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue